Class Analytics

  • All Implemented Interfaces:

    public class Analytics
    extends AbstractComponent
    • Field Detail

      • TAG

        public static final java.lang.String TAG
      • destination

        public java.lang.String destination
        The value that will be passed as the 'destination' parameter for all analytics events. This must be a valid URI.
    • Constructor Detail

      • Analytics

        public Analytics​(EventEmitter emitter,
                         android.content.Context context)
      • Analytics

        protected Analytics​(EventEmitter emitter,
                            android.content.Context context,
                            java.lang.Class<? extends Component> componentClass)
    • Method Detail

      • getSessionKey

        public static java.lang.String getSessionKey()
        Gets the globally unique session key for this application session.
        the unique session key
      • getAccount

        public java.lang.String getAccount()
        Returns the global account override.
      • setAccount

        public void setAccount​(java.lang.String account)
        Sets the global account override.
      • setIsPlaybackForegrounded

        public void setIsPlaybackForegrounded​(boolean foregrounded)
        Set if the playback is attached to an on-going notification in a foreground service.
        foregrounded - If the playback is attached to a service.
      • setDestination

        public void setDestination​(java.lang.String destination)
        The destination must be a valid URI.
      • setSource

        public void setSource​(java.lang.String source)
        The source must be a valid URI.
      • sendAnalyticsRequest

        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)
      • getUserAgentDeviceType

        public static java.lang.String getUserAgentDeviceType()
        Return a static version of the result from the getDeviceType method in this class
        the static version of the device type, to build the SDK User-Agent string
      • getUniqueIdentifierEnabled

        public boolean getUniqueIdentifierEnabled()
        Return whether the client side unique identifier feature is enabled.
      • setUniqueIdentifierEnabled

        public void setUniqueIdentifierEnabled​(boolean uniqueIdentifierEnabled)
        Set whether the client side unique identifier feature is enabled. By default, unique user tracking is implemented by the Brightcove Analytics server using the client IP address and user agent, but when the client side unique identifier feature is enabled, the device's android ID is used to uniquely identify the user.
        See Also:
      • copy

        public static Analytics copy​(Analytics analytics,
                                     EventEmitter emitter,
                                     android.content.Context context)
        Creates a new instance with the properties from the provided Analytics.
        analytics - The analytics used to initialize the properties of the new instance.
        emitter - The event emitter associated with playback.
        context - The application context.
        A new instance of Analytics.