Share via


AdSelectionManager.GetAdSelectionData Method

Definition

Collects custom audience data from device.

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

Parameters

executor
IExecutor
receiver
IOutcomeReceiver
Attributes

Remarks

Collects custom audience data from device. Returns a compressed and encrypted blob to send to auction servers for ad selection. For more details, please visit Bidding and Auction Services Explainer.

Custom audience ads must have a ad_render_id to be eligible for to be collected.

See AdSelectionManager#persistAdSelectionResult for how to process the results of the ad selection run on server-side with the blob generated by this API.

The output is passed by the receiver, which either returns an GetAdSelectionDataOutcome for a successful run, or an Exception includes the type of the exception thrown and the corresponding error message.

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.getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.adservices.adselection.GetAdSelectionDataOutcome, 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