CustomAudienceManager.LeaveCustomAudience 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.
Attempts to remove a user from a custom audience by deleting any existing CustomAudience
data, identified by ownerPackageName
, buyer
, and name
.
[Android.Runtime.Register("leaveCustomAudience", "(Landroid/adservices/customaudience/LeaveCustomAudienceRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetLeaveCustomAudience_Landroid_adservices_customaudience_LeaveCustomAudienceRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE")]
public virtual void LeaveCustomAudience (Android.AdServices.CustomAudiences.LeaveCustomAudienceRequest leaveCustomAudienceRequest, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("leaveCustomAudience", "(Landroid/adservices/customaudience/LeaveCustomAudienceRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetLeaveCustomAudience_Landroid_adservices_customaudience_LeaveCustomAudienceRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE")>]
abstract member LeaveCustomAudience : Android.AdServices.CustomAudiences.LeaveCustomAudienceRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.LeaveCustomAudience : Android.AdServices.CustomAudiences.LeaveCustomAudienceRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- leaveCustomAudienceRequest
- LeaveCustomAudienceRequest
- executor
- IExecutor
- receiver
- IOutcomeReceiver
- Attributes
Remarks
Attempts to remove a user from a custom audience by deleting any existing CustomAudience
data, identified by ownerPackageName
, buyer
, and name
.
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 LimitExceededException
if the calling package exceeds the allowed rate limits and is throttled.
This call does not inform the caller whether the custom audience specified existed in on-device storage. In other words, it will fail silently when a buyer attempts to leave a custom audience that was not joined.
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.