@Emits(events={"account","didSetAnalyticsBaseParams","error"}) @ListensFor(events={"account","activityStarted","activityStopped","activityDestroyed","adBreakStarted","adBreakCompleted","adProgress","addAnalyticsBaseParams","analyticsCatalogRequest","analyticsCatalogResponse","analyticsVideoEngagement","bufferingCompleted","bufferingStarted","completed","didPause","didPlay","didSeekTo","didSetVideo","error","fragmentStarted","fragmentStopped","fragmentDestroyed","play","progress","setAnalyticsBaseParams","version","videoDurationChanged","videoSizeKnown","willChangeVideo","videoDownloadStarted","videoDownloadCompleted","videoDownloadCancelled","videoDownloadFailed"}) public class Analytics extends AbstractComponent
Modifier and Type | Class and Description |
---|---|
static class |
Analytics.Fields |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
destination
The value that will be passed as the 'destination' parameter
for all analytics events.
|
static java.lang.String |
TAG |
eventEmitter, listenerTokens
Modifier | Constructor and Description |
---|---|
|
Analytics(EventEmitter emitter,
android.content.Context context) |
protected |
Analytics(EventEmitter emitter,
android.content.Context context,
java.lang.Class<? extends Component> componentClass) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccount()
Returns the global account override.
|
static java.lang.String |
getSessionKey()
Gets the globally unique session key for this application session.
|
boolean |
getUniqueIdentifierEnabled()
Return whether the client side unique identifier feature is
enabled.
|
static java.lang.String |
getUserAgentDeviceType()
Return a static version of the result from the getDeviceType method in this class
|
protected java.util.Map<java.lang.String,java.lang.String> |
sendAnalyticsRequest(Event event,
java.lang.String analyticsEvent,
java.util.Map<java.lang.String,java.lang.String> customParams) |
void |
setAccount(java.lang.String account)
Sets the global account override.
|
void |
setDestination(java.lang.String destination)
The destination must be a valid URI.
|
void |
setSource(java.lang.String source)
The source must be a valid URI.
|
void |
setUniqueIdentifierEnabled(boolean uniqueIdentifierEnabled)
Set whether the client side unique identifier feature is
enabled.
|
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
public static final java.lang.String TAG
public java.lang.String destination
public Analytics(EventEmitter emitter, android.content.Context context)
protected Analytics(EventEmitter emitter, android.content.Context context, java.lang.Class<? extends Component> componentClass)
@NonNull public static java.lang.String getSessionKey()
public java.lang.String getAccount()
public void setAccount(java.lang.String account)
public void setDestination(java.lang.String destination)
public void setSource(java.lang.String source)
protected java.util.Map<java.lang.String,java.lang.String> sendAnalyticsRequest(Event event, java.lang.String analyticsEvent, java.util.Map<java.lang.String,java.lang.String> customParams)
public static java.lang.String getUserAgentDeviceType()
public boolean getUniqueIdentifierEnabled()
public void setUniqueIdentifierEnabled(boolean uniqueIdentifierEnabled)
Settings.Secure.ANDROID_ID