CustomAudienceManager.JoinCustomAudience Method

Definition

Adds the user to the given CustomAudience.

[Android.Runtime.Register("joinCustomAudience", "(Landroid/adservices/customaudience/JoinCustomAudienceRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetJoinCustomAudience_Landroid_adservices_customaudience_JoinCustomAudienceRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE")]
public virtual void JoinCustomAudience (Android.AdServices.CustomAudiences.JoinCustomAudienceRequest joinCustomAudienceRequest, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("joinCustomAudience", "(Landroid/adservices/customaudience/JoinCustomAudienceRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetJoinCustomAudience_Landroid_adservices_customaudience_JoinCustomAudienceRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE")>]
abstract member JoinCustomAudience : Android.AdServices.CustomAudiences.JoinCustomAudienceRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.JoinCustomAudience : Android.AdServices.CustomAudiences.JoinCustomAudienceRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

joinCustomAudienceRequest
JoinCustomAudienceRequest
executor
IExecutor
receiver
IOutcomeReceiver
Attributes

Remarks

Adds the user to the given CustomAudience.

An attempt to register the user for a custom audience with the same combination of ownerPackageName, buyer, and name will cause the existing custom audience's information to be overwritten, including the list of ads data.

Note that the ads list can be completely overwritten by the daily background fetch job.

This call fails with an SecurityException if

<ol> <li>the ownerPackageName is not calling app's package name and/or <li>the buyer is not authorized to use the API. </ol>

This call fails with an IllegalArgumentException if

<ol> <li>the storage limit has been exceeded by the calling application and/or <li>any URI parameters in the CustomAudience given are not authenticated with the CustomAudience buyer. </ol>

This call fails with LimitExceededException if the calling package exceeds the allowed rate limits and is throttled.

This call fails with an IllegalStateException if an internal service error is encountered.

Java documentation for android.adservices.customaudience.CustomAudienceManager.joinCustomAudience(android.adservices.customaudience.JoinCustomAudienceRequest, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Object, 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