Tallboy
Tallboy

Reputation: 13407

Which Google Play API is 'Advertising ID' in?

I'm integrating an ad SDK, and their instructions say to add all of Google Play services. The only thing it says they use it for, however, is the advertising ID.

I want to include just that specific part of Google Play Services, but I'm not sure which one it's in.

Here's the docs for it: http://developer.android.com/google/play-services/id.html

I would assume its in... com.google.android.gms:play-services-ads:8.4.0, however when I look there in the docs, the class headings don't make any mention of the identifier (or any of the many other ads functions/classes in the sidebar... which leads me to believe com.google.android.gms:play-services-ads might not include what I need.

Upvotes: 0

Views: 722

Answers (2)

Meanman
Meanman

Reputation: 1544

The advertising id is the following undocumented package:

com.google.android.gms:play-services-ads-identifier:17.0.0

Upvotes: 0

Mattia Maestrini
Mattia Maestrini

Reputation: 32780

To be able to use the Advertising ID you only need to include:

com.google.android.gms:play-services-basement:8.4.0

You can see in which library is included directly in Android Studio:

enter image description here

Also, you can find the documentation of the Advertising ID in the ads.identifier section.

Upvotes: 1

Related Questions