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

Ads

The Advertising ID library defines an interface to interact with system-level ad providers across the devices running your app. This interface allows your app to receive consistent advertising ID values.

For information on how to work with the advertising ID library, see the guide on how to get user-resettable ad identifiers.

Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
August 7, 2019 - - - 1.0.0-alpha01

Declaring dependencies

To add a dependency on Ads, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
  def ads_version = "1.0.0-alpha01"
  implementation 'androidx.ads:ads-identifier:$ads_version'

  // Optional - add if you're using Guava to handle
  // return values of type ListenableFuture.
  implementation 'com.google.guava:guava:28.0-android'
}

For more information about dependencies, see Add build dependencies.

Version 1.0.0

Version 1.0.0-alpha01

August 7, 2019

androidx.ads:ads-identifier:1.0.0-alpha01, androidx.ads:ads-identifier-common:1.0.0-alpha01, and androidx.ads:ads-identifier-provider:1.0.0-alpha01 are released. The commits included in this version can be found here.