Sdílet prostřednictvím


AdSelectionManager.PersistAdSelectionResult Method

Definition

Persists the ad selection results from the server-side.

[Android.Runtime.Register("persistAdSelectionResult", "(Landroid/adservices/adselection/PersistAdSelectionResultRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetPersistAdSelectionResult_Landroid_adservices_adselection_PersistAdSelectionResultRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)]
public virtual void PersistAdSelectionResult (Android.AdServices.AdSelection.PersistAdSelectionResultRequest request, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("persistAdSelectionResult", "(Landroid/adservices/adselection/PersistAdSelectionResultRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetPersistAdSelectionResult_Landroid_adservices_adselection_PersistAdSelectionResultRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)>]
abstract member PersistAdSelectionResult : Android.AdServices.AdSelection.PersistAdSelectionResultRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.PersistAdSelectionResult : Android.AdServices.AdSelection.PersistAdSelectionResultRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

executor
IExecutor
receiver
IOutcomeReceiver
Attributes

Remarks

Persists the ad selection results from the server-side. For more details, please visit Bidding and Auction Services Explainer

See AdSelectionManager#getAdSelectionData for how to generate an encrypted blob to run an ad selection on the server side.

The output is passed by the receiver, which either returns an AdSelectionOutcome for a successful run, or an Exception includes the type of the exception thrown and the corresponding error message. The AdSelectionOutcome#getAdSelectionId() is not guaranteed to be the same as the PersistAdSelectionResultRequest#getAdSelectionDataId() or the deprecated PersistAdSelectionResultRequest#getAdSelectionId().

If the IllegalArgumentException is thrown, it is caused by invalid input argument the API received to run the ad selection.

If the IllegalStateException is thrown with error message "Failure of AdSelection services.", it is caused by an internal failure of the ad selection service.

If the TimeoutException is thrown, it is caused when a timeout is encountered during bidding, scoring, or overall selection process to find winning Ad.

If the LimitExceededException is thrown, it is caused when the calling package exceeds the allowed rate limits and is throttled.

If the SecurityException is thrown, it is caused when the caller is not authorized or permission is not requested.

Java documentation for android.adservices.adselection.AdSelectionManager.persistAdSelectionResult(android.adservices.adselection.PersistAdSelectionResultRequest, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome, java.lang.Exception>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to