public final class PureMetrics
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PureMetrics.Builder
A Builder class for
PureMetrics. |
static class |
PureMetrics.LOG_LEVEL
Available logging levels for the SDK
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isActivityInForground()
Check to see if the app is running in foreground or background
|
static void |
trackDeviceProperties(java.lang.String deviceProperty,
boolean propertyValue)
Track a device property/trait.
|
static void |
trackDeviceProperties(java.lang.String deviceProperty,
double propertyValue)
Track a device property/trait.
|
static void |
trackDeviceProperties(java.lang.String deviceProperty,
int propertyValue)
Track a device property/trait.
|
static void |
trackDeviceProperties(java.lang.String deviceProperty,
java.lang.String propertyValue)
Track a user property/trait.
|
static void |
trackEvent(java.lang.String eventName)
Track an event which was performed by the user
|
static void |
trackEvent(java.lang.String eventName,
java.util.HashMap<java.lang.String,java.lang.Object> attributes)
Track an event and its associated event attribute.
|
static void |
trackSessionStart()
Explicitly track Session start.
|
static void |
trackSessionStart(java.util.HashMap extras)
Explicitly track Session start.
|
static void |
trackSessionStart(java.lang.String referrer,
java.lang.String type)
Explicitly track Session start.
|
static void |
trackUserProperties(java.lang.String userProperty,
boolean propertyValue)
Track a user property/trait.
|
static void |
trackUserProperties(java.lang.String userProperty,
double propertyValue)
Track a user property/trait.
|
static void |
trackUserProperties(java.lang.String userProperty,
int propertyValue)
Track a user property/trait.
|
static void |
trackUserProperties(java.lang.String userProperty,
java.lang.String propertyValue)
Track a user property/trait.
|
static PureMetrics.Builder |
withBuilder()
Helper method to get an instance of the
PureMetrics.Builder to configure the SDK |
public static PureMetrics.Builder withBuilder()
PureMetrics.Builder to configure the SDKPureMetrics.Builder classpublic static boolean isActivityInForground()
public static void trackEvent(java.lang.String eventName)
eventName - The name of the eventpublic static void trackEvent(java.lang.String eventName,
java.util.HashMap<java.lang.String,java.lang.Object> attributes)
eventName - The name of the eventattributes - A HashMap of the event attributespublic static void trackUserProperties(java.lang.String userProperty,
java.lang.String propertyValue)
userProperty - Name of the user propertypropertyValue - String Value associated with the user propertypublic static void trackUserProperties(java.lang.String userProperty,
int propertyValue)
userProperty - Name of the user propertypropertyValue - int Value associated with the user propertypublic static void trackUserProperties(java.lang.String userProperty,
double propertyValue)
userProperty - Name of the user propertypropertyValue - double Value associated with the user propertypublic static void trackUserProperties(java.lang.String userProperty,
boolean propertyValue)
userProperty - Name of the user propertypropertyValue - boolean Value associated with the user propertypublic static void trackDeviceProperties(java.lang.String deviceProperty,
java.lang.String propertyValue)
deviceProperty - Name of the device propertypropertyValue - String Value associated with the user propertypublic static void trackDeviceProperties(java.lang.String deviceProperty,
int propertyValue)
deviceProperty - Name of the device propertypropertyValue - Integer Value associated with the user propertypublic static void trackDeviceProperties(java.lang.String deviceProperty,
double propertyValue)
deviceProperty - Name of the device propertypropertyValue - Double Value associated with the user propertypublic static void trackDeviceProperties(java.lang.String deviceProperty,
boolean propertyValue)
deviceProperty - Name of the device propertypropertyValue - Boolean Value associated with the user propertypublic static void trackSessionStart()
PureMetrics.Builder.disableAutoTracking(boolean) as truepublic static void trackSessionStart(java.util.HashMap extras)
PureMetrics.Builder.disableAutoTracking(boolean) as trueextras - An extras which need to be tracked which gives more insight regarding the source of launchpublic static void trackSessionStart(java.lang.String referrer,
java.lang.String type)
PureMetrics.Builder.disableAutoTracking(boolean) as truereferrer - The referrer for the session. This can be a notification, launcher, defaulttype - The type of usage, like within app, external etc.