public class SharedPrefsUniqueIdService extends java.lang.Object implements UniqueIdService
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PREFS_NAME |
protected static java.lang.String |
UNIQUE_ID_KEY |
| Constructor and Description |
|---|
SharedPrefsUniqueIdService(UniqueIdGenerator generator,
java.lang.String appId,
android.content.Context applicationContext)
Uses Shared prefs to recall and store the unique ID
|
| Modifier and Type | Method and Description |
|---|---|
Id |
getUniqueId(AnalyticsContext context)
Get the Id based on the passed in context
|
static UniqueIdService |
newInstance(java.lang.String appId,
android.content.Context applicationContext)
Creates a new UniqueIdService with a random id generator
|
protected static final java.lang.String PREFS_NAME
protected static final java.lang.String UNIQUE_ID_KEY
public SharedPrefsUniqueIdService(UniqueIdGenerator generator, java.lang.String appId, android.content.Context applicationContext)
generator - used to create new unique id'spublic static UniqueIdService newInstance(java.lang.String appId, android.content.Context applicationContext)
public Id getUniqueId(AnalyticsContext context)
UniqueIdServicegetUniqueId in interface UniqueIdServicecontext - The Analytics context to use when looking up the id