public abstract class AdIdManager


AdId Manager provides APIs for app and ad-SDKs to access advertising ID. The advertising ID is a unique, per-device, user-resettable ID for advertising. It gives users better controls and provides developers with a simple, standard system to continue to monetize their apps via personalized ads (formerly known as interest-based ads).

Summary

Public methods

abstract @NonNull AdId
@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_AD_ID")
getAdId()

Return the AdId.

static final AdIdManager

Creates AdIdManager.

Public methods

getAdId

@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_AD_ID")
public abstract @NonNull AdId getAdId()

Return the AdId.

Throws
java.lang.SecurityException

if caller is not authorized to call this API.

kotlin.IllegalStateException

if this API is not available.

android.os.LimitExceededException

if rate limit was reached.

obtain

Added in 1.0.0
public static final AdIdManager obtain(@NonNull Context context)

Creates AdIdManager.

Returns
AdIdManager

AdIdManager object. If the device is running an incompatible build, the value returned is null.