AdIdManagerFutures


abstract class AdIdManagerFutures


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). This class can be used by Java clients.

Summary

Public companion functions

AdIdManagerFutures?
from(context: Context)

Creates AdIdManagerFutures.

Public functions

abstract ListenableFuture<AdId>
@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_AD_ID")
getAdIdAsync()

Return the AdId.

Public companion functions

from

Added in 1.0.0
fun from(context: Context): AdIdManagerFutures?

Creates AdIdManagerFutures.

Returns
AdIdManagerFutures?

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

Public functions

getAdIdAsync

Added in 1.0.0
@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_AD_ID")
abstract fun getAdIdAsync(): ListenableFuture<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.