Class DefaultAnalyticsHandler

java.lang.Object
com.brightcove.player.analytics.DefaultAnalyticsHandler
All Implemented Interfaces:
IAnalyticsHandler, IHandler

public class DefaultAnalyticsHandler extends Object implements IAnalyticsHandler
  • Method Details

    • setProcessListener

      public DefaultAnalyticsHandler setProcessListener(@Nullable IAnalyticsHandler.ProcessListener listener)
      Sets the listener that can receive callback notifications from this instance before and after processing an event.
      Parameters:
      listener - null or reference to a listener.
      Returns:
      reference to this instance.
    • getProcessListener

      @Nullable public IAnalyticsHandler.ProcessListener getProcessListener()
      Sets the listener that can receive callback notifications from this instance before and after processing an event.
      Returns:
      null or reference to the current listener.
    • getInstance

      public static DefaultAnalyticsHandler getInstance(@NonNull android.content.Context context)
      Provides reference to the single instance of DefaultAnalyticsHandler.
      Parameters:
      context - context of the host activity or application.
      Returns:
      reference to the single instance of DefaultAnalyticsHandler.
      Throws:
      NullPointerException - if the context is null.
    • onAttached

      public void onAttached()
      Description copied from interface: IHandler
      This method will be invoked when the handler is added to a network client.
      Specified by:
      onAttached in interface IHandler
    • onRemoved

      public void onRemoved()
      Description copied from interface: IHandler
      This method will be invoked when the handler is removed from a network client.
      Specified by:
      onRemoved in interface IHandler
    • onAnalyticsEvent

      public void onAnalyticsEvent(@NonNull com.brightcove.player.analytics.AnalyticsEvent event, @Nullable IAnalyticsErrorListener errorHandler)
      Description copied from interface: IAnalyticsHandler
      This method will be called by the AnalyticsClient, when an analytics event is received from the application.
      Specified by:
      onAnalyticsEvent in interface IAnalyticsHandler
      Parameters:
      event - the analytics client.
      errorHandler - reference to analytics error listener, if any.
    • onNetworkEntitlementChanged

      public void onNetworkEntitlementChanged(int type, boolean enabled)
      Description copied from interface: IAnalyticsHandler
      This method will be called when the entitlement for specific network has been changed.
      Specified by:
      onNetworkEntitlementChanged in interface IAnalyticsHandler
      Parameters:
      type - the network type
      enabled - true if the network is entitled for analytics transmission, otherwise false.