Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

AdvertisingIdProvider

interface AdvertisingIdProvider
androidx.ads.identifier.provider.AdvertisingIdProvider

The class for the AndroidX Advertising ID Provider that should provide the resettable ID and LAT preference should implement this interface. See AdvertisingIdProviderManager for more details.

Note: The implementation of this interface must be completely thread-safe.

Summary

Public methods

abstract String

Retrieves the Advertising ID.

abstract Boolean

Retrieves whether the user has chosen to limit ad tracking (ads personalization).

Public methods

getId

@NonNull abstract fun getId(): String

Retrieves the Advertising ID.

This ID will be normalized to UUID format by the developer library if it isn't already.

isLimitAdTrackingEnabled

abstract fun isLimitAdTrackingEnabled(): Boolean

Retrieves whether the user has chosen to limit ad tracking (ads personalization).