question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use ads-identifier library instead of play-services-ads to fetch advertising ID

See original GitHub issue

Summary

Right now the SDK uses the big play-services-ads library to fetch the advertising ID. However, Google has introduced the much smaller and better scoped ads-identifier library for exactly that task: https://developer.android.com/training/articles/ad-id

Motivations

The new Advertising ID library is smaller and better scoped. Especially apps which don’t already display Google Ads would benefit from switching to the Advertising ID library. Also, using the new library now is Google’s recommended approach to fetch the Advertising ID on Android.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dantetamcommented, Feb 12, 2021

My bad. I ran into a combination of strange Gradle dependency issues and misread your proposal. I did investigate and yeah, it looks like AdvertisingIdClient is the only actual library class we are using. I ran into some other deprecated libraries like com.google.android.gms.common.GooglePlayServicesUtil that I’ll investigate more into. I’ve seen the new package you are referring to in androidx... and I’ll be testing that again.

1reaction
haoliu-ampcommented, Oct 26, 2020

@ubuntudroid This’s a really good point! We will take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advertising ID - Play Console Help
The advertising ID is a unique, user-resettable ID for advertising, provided by Google Play services. It gives users better controls and provides developers ......
Read more >
Get a user-resettable advertising ID
Get the ad identifier details, including the advertising ID, by calling AdvertisingIdClient.getAdvertisingIdInfo() . The Advertising ID library ...
Read more >
How to get Advertising ID in android programmatically
Get GAID(Google's advertising ID) 1. Download latest Google Play Services SDK. 2. Import the code and add it as a library project.
Read more >
AdvertisingIdClient.Info | Google Play services
Stay organized with collections Save and categorize content based on your preferences. Includes both the advertising ID as well as the limit ad...
Read more >
How to Disable Ad ID Tracking on iOS and Android ...
Settings app and navigate to · Privacy > · Ads. Tap “ · Delete advertising ID,” then tap it again on the next...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found