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 companion functions

AdIdManager?
obtain(context: Context)

Creates AdIdManager.

Public functions

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

Return the AdId.

Public companion functions

obtain

Added in 1.0.0
fun obtain(context: Context): AdIdManager?

Creates AdIdManager.

Returns
AdIdManager?

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

Public functions

getAdId

@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_AD_ID")
abstract suspend fun getAdId(): AdId

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.