public class DeviceId
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DeviceId.Type
Enum used throughout Countly which controls what kind of ID Countly should use.
|
Constructor and Description |
---|
DeviceId(DeviceId.Type type)
Initialize DeviceId with Type of OPEN_UDID or ADVERTISING_ID
|
DeviceId(java.lang.String developerSuppliedId)
Initialize DeviceId with Developer-supplied id string
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId() |
DeviceId.Type |
getType() |
void |
init(Context context,
CountlyStore store,
boolean raiseExceptions)
Initialize device ID generation, that is start up required services and send requests.
|
protected void |
setId(DeviceId.Type type,
java.lang.String id) |
protected void |
switchToIdType(DeviceId.Type type,
Context context,
CountlyStore store) |
public DeviceId(DeviceId.Type type)
type
- type of ID generation strategypublic DeviceId(java.lang.String developerSuppliedId)
developerSuppliedId
- Device ID string supplied by developerpublic void init(Context context, CountlyStore store, boolean raiseExceptions)
context
- Context to usestore
- CountlyStore to store configuration inraiseExceptions
- whether to raise exceptions in case of illegal state or notpublic java.lang.String getId()
protected void setId(DeviceId.Type type, java.lang.String id)
protected void switchToIdType(DeviceId.Type type, Context context, CountlyStore store)
public DeviceId.Type getType()