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.
Android – Find your Advertising ID Simply open the Google Settings app on your Android device and click on “Ads.” Your Advertising Identifier will be listed at the bottom of the screen.
YES. Admobs uses Advertising ID. even if you did not put it in the manifest -> latest google ads sdk "play-services-ads" have it in their manifest and it is imported to yours.
To reset your Android advertising ID, Open Google Settings on your Android device by tapping on menu and then on Google Settings once all apps are displayed on the screen. Locate and tap on the Ads menu under Services. Tap on “reset advertising ID” on the new page.
The ad identifier - aka “IDFA” on iOS, or “AAID” on Android - is the key that enables most third-party tracking on mobile devices. Disabling it will make it substantially harder for advertisers and data brokers to track and profile you, and will limit the amount of your personal information up for sale.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With