public class

IdentifierForAdvertiserProvider

extends Object
java.lang.Object
   ↳ com.usebutton.sdk.util.IdentifierForAdvertiserProvider

Summary

Public Constructors
IdentifierForAdvertiserProvider(Context context)
This class can be used to get Advertising ID from the Google Play Services library via reflection.
Public Methods
String getIdentifier()
This call is blocking and should _not_ be run from the main thread.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IdentifierForAdvertiserProvider (Context context)

This class can be used to get Advertising ID from the Google Play Services library via reflection. Will fail silently if not on classpath, so make sure you have this dependency in your build.gradle: compile 'com.google.android.gms:play-services-ads:7.0.0

Public Methods

public String getIdentifier ()

This call is blocking and should _not_ be run from the main thread. For more info: https://developer.android.com/google/play-services/id.html

Returns
  • the Advertising ID if available (Google Play Services on classpath and user have not disabled tracking).