Is it possible to get the android advertising id without adding play services ads dependency?
Asked Answered
G

1

8

I am using the google play ads dependency just to get the advertising id.

com.google.android.gms:play-services-ads:7.8.0

Is there any way to avoid this as the library has a method count of 6201.

Goldengoldenberg answered 25/12, 2015 at 0:15 Comment(1)
Not all of GPS is proguaded. Click on "external" libs from the left hand side and you can see which module that AdvertisingId will be in.Varistor
F
11

AdvertisingIdClient and its associated classes are also found in the much smaller

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

if you use Google Play services 8.3. Prior to that point, you are correct in that it was part of play-services-ads.

In any case, it is strongly recommended that you use ProGuard to remove unused code from your app before shipping retail versions of your app.

Flouncing answered 25/12, 2015 at 1:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.