public final class LifeCycle
extends java.lang.Object
DataSources.Key
.Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getCurrentState()
Populated a map with
|
static LifeCycle |
getInstance(java.lang.String instanceId)
When manually tracking (
isAutoTracking() is false) this method will return
an instance previously setup by setupInstance(String, Tealium.Config, boolean) . |
boolean |
isAutoTracking() |
static LifeCycle |
setupInstance(java.lang.String instanceId,
Tealium.Config config,
boolean isAutoTracking)
This method needs to be called before calling
Tealium.createInstance(String, Tealium.Config)
in order for the data to track correctly. |
void |
trackLaunchEvent(java.util.Map<java.lang.String,?> data)
Manually track a launch event
|
void |
trackSleepEvent(java.util.Map<java.lang.String,?> data)
Manually track a sleep event
|
void |
trackWakeEvent(java.util.Map<java.lang.String,?> data)
Manually track a wake event
|
public boolean isAutoTracking()
public void trackLaunchEvent(java.util.Map<java.lang.String,?> data)
data
- OPTIONAL additional data if desiredjava.lang.UnsupportedOperationException
- if isAutoTracking()
is truepublic void trackWakeEvent(java.util.Map<java.lang.String,?> data)
data
- OPTIONAL additional data if desiredjava.lang.UnsupportedOperationException
- if isAutoTracking()
is truepublic void trackSleepEvent(java.util.Map<java.lang.String,?> data)
data
- OPTIONAL additional data if desiredjava.lang.UnsupportedOperationException
- if isAutoTracking()
is truepublic java.util.Map<java.lang.String,java.lang.Object> getCurrentState()
Populated a map with
DataSources.Key.LIFECYCLE_DAYSSINCELAUNCH
DataSources.Key.LIFECYCLE_DAYOFWEEK_LOCAL
DataSources.Key.LIFECYCLE_HOUROFDAY_LOCAL
DataSources.Key.LIFECYCLE_TOTALSECONDSAWAKE
DataSources.Key.LIFECYCLE_FIRSTLAUNCHDATE
DataSources.Key.LIFECYCLE_FIRSTLAUNCHDATE_MMDDYYYY
DataSources.Key.LIFECYCLE_LASTLAUNCHDATE
DataSources.Key.LIFECYCLE_TOTALCRASHCOUNT
DataSources.Key.LIFECYCLE_TOTALLAUNCHCOUNT
DataSources.Key.LIFECYCLE_LAUNCHCOUNT
DataSources.Key.LIFECYCLE_TOTALWAKECOUNT
DataSources.Key.LIFECYCLE_WAKECOUNT
DataSources.Key.LIFECYCLE_TOTALSLEEPCOUNT
DataSources.Key.LIFECYCLE_SLEEPCOUNT
when isAutoTracking()
is true, this data is added to every track call.
public static LifeCycle setupInstance(java.lang.String instanceId, Tealium.Config config, boolean isAutoTracking)
Tealium.createInstance(String, Tealium.Config)
in order for the data to track correctly.instanceId
- Tealium
instance idconfig
- Tealium.Config
of the Tealium instanceisAutoTracking
- whether the module should handle its own LifeCycle trackingpublic static LifeCycle getInstance(java.lang.String instanceId)
isAutoTracking()
is false) this method will return
an instance previously setup by setupInstance(String, Tealium.Config, boolean)
.