public class DefaultAnalyticsHandler extends java.lang.Object implements IAnalyticsHandler
IAnalyticsHandler.ProcessListener| Modifier and Type | Method and Description |
|---|---|
static DefaultAnalyticsHandler |
getInstance(android.content.Context context)
Provides reference to the single instance of
DefaultAnalyticsHandler. |
IAnalyticsHandler.ProcessListener |
getProcessListener()
Sets the listener that can receive callback notifications from this instance
before and after processing an event.
|
void |
onAnalyticsEvent(com.brightcove.player.analytics.AnalyticsEvent event,
IAnalyticsErrorListener errorHandler)
This method will be called by the
AnalyticsClient, when an analytics event is received
from the application. |
void |
onAttached()
This method will be invoked when the handler is added to
AnalyticsClient. |
void |
onNetworkEntitlementChanged(int type,
boolean enabled)
This method will be called when the entitlement for specific network has been changed.
|
void |
onRemoved()
This method will be invoked when the handler is removed from
AnalyticsClient. |
DefaultAnalyticsHandler |
setProcessListener(IAnalyticsHandler.ProcessListener listener)
Sets the listener that can receive callback notifications from this instance
before and after processing an event.
|
public DefaultAnalyticsHandler setProcessListener(@Nullable IAnalyticsHandler.ProcessListener listener)
listener - null or reference to a listener.@Nullable public IAnalyticsHandler.ProcessListener getProcessListener()
public static DefaultAnalyticsHandler getInstance(@NonNull android.content.Context context)
DefaultAnalyticsHandler.context - context of the host activity or application.DefaultAnalyticsHandler.java.lang.NullPointerException - if the context is null.public void onAttached()
IAnalyticsHandlerAnalyticsClient.onAttached in interface IAnalyticsHandlerpublic void onRemoved()
IAnalyticsHandlerAnalyticsClient.onRemoved in interface IAnalyticsHandlerpublic void onAnalyticsEvent(@NonNull
com.brightcove.player.analytics.AnalyticsEvent event,
@Nullable
IAnalyticsErrorListener errorHandler)
IAnalyticsHandlerAnalyticsClient, when an analytics event is received
from the application.onAnalyticsEvent in interface IAnalyticsHandlerevent - the analytics client.errorHandler - reference to analytics error listener, if any.public void onNetworkEntitlementChanged(int type,
boolean enabled)
IAnalyticsHandleronNetworkEntitlementChanged in interface IAnalyticsHandlertype - the network typeenabled - true if the network is entitled for analytics transmission, otherwise false.