AdSelectionManager.SetAppInstallAdvertisers Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gives the provided list of adtechs the ability to do app install filtering on the calling app.
[Android.Runtime.Register("setAppInstallAdvertisers", "(Landroid/adservices/adselection/SetAppInstallAdvertisersRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetSetAppInstallAdvertisers_Landroid_adservices_adselection_SetAppInstallAdvertisersRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)]
public virtual void SetAppInstallAdvertisers(Android.AdServices.AdSelection.SetAppInstallAdvertisersRequest request, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("setAppInstallAdvertisers", "(Landroid/adservices/adselection/SetAppInstallAdvertisersRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetSetAppInstallAdvertisers_Landroid_adservices_adselection_SetAppInstallAdvertisersRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)>]
abstract member SetAppInstallAdvertisers : Android.AdServices.AdSelection.SetAppInstallAdvertisersRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.SetAppInstallAdvertisers : Android.AdServices.AdSelection.SetAppInstallAdvertisersRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- request
- SetAppInstallAdvertisersRequest
The advertisers to set for app-install filtering.
- executor
- IExecutor
The executor used for service callbacks. Errors during service access can be sent directly to the receiver.
- receiver
- IOutcomeReceiver
The callback for the operation. In the Android 16 AOSP source, it can receive a result or an exception. In the Android 17 AOSP source, both service callbacks report an exception.
- Attributes
Remarks
Gives the provided list of adtechs the ability to do app install filtering on the calling app.
The input request is provided by the Ads SDK and the request object is transferred via a Binder call. For this reason, the total size of these objects is bound to the Android IPC limitations. Failures to transfer the advertisers will throws an TransactionTooLargeException.
The output is passed by the receiver, which either returns an empty Object 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.
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 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.
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.