android, which dependency to use if needs AdvertisingIdClient
having function to get AdvertisingIdClient.Info
private static AdvertisingIdClient.Info getAdsClientInfo(@NonNull final Context context) throws GooglePlayServicesNotAvailableException, IOException, GooglePlayServicesRepairableException { int isGPAvailable = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context); if (isGPAvailable == ConnectionResult.SUCCESS) { return AdvertisingIdClient.getAdvertisingIdInfo(context); } return null; }
it uses AdvertisingIdClient.getAdvertisingIdInfo(context)
there are three libs in https://developers.google.com/android/guides/setup
Google Mobile Ads com.google.android.gms:play-services-ads:20.1.0 Android Advertising ID (AAID) com.google.android.gms:play-services-ads-identifier:17.0.0 Lightweight version of Google Mobile Ads com.google.android.gms:play-services-ads-lite:20.1.0
what are the difference among these, and which one is safe to use for the purpose?