AnalyticsClient

open class AnalyticsClient

Analytics client can be used to publish analytics event to the list of registered analytics handlers. By default the analytics client will attempt to send the analytics event to the Brightcove analytics collector. This default behavior can be change add custom handlers.

See also

Properties

Link copied to clipboard
The default limit for analytics events backlog, expressed as total number of bytes.
Link copied to clipboard
The maximum number of events that will be processed in a batch when transmitting backlog.
Link copied to clipboard
The maximum number of attempts that will be made to send NORMAL events.

Functions

Link copied to clipboard
Adds the specified handler to the set of handlers that will be notified when an analytics event is received.
Link copied to clipboard
open fun disableNetwork(type: Int)
Disables the specified network type for transmission of analytics events.
Link copied to clipboard
open fun enableNetwork(type: Int)
Enables the specified network type for transmission of analytics events.
Link copied to clipboard
open fun getBacklogLimit(): Long
Gets the maximum size of the analytics events backlog, expressed as total number of bytes.
Link copied to clipboard
open fun getBatchSize(): Int
Gets the maximum number of events that will be processed in a batch when transmitting backlog.
Link copied to clipboard
open fun getInstance(context: Context): AnalyticsClient
Provides reference to the single instance of AnalyticsClient.
Link copied to clipboard
open fun getNetworkEntitlements(): SparseArray<Boolean>
Gets the network entitlements for transmission of analytics events.
Link copied to clipboard
open fun getRetryLimit(): Int
Gets the maximum number of attempts that will be made to send NORMAL events.
Link copied to clipboard
open fun isNetworkEnabled(type: Int): Boolean
Checks if the specified network type is currently enabled for transmission of analytics events.
Link copied to clipboard
open fun publish(event: AnalyticsEvent, errorHandler: IAnalyticsErrorListener): AnalyticsClient
Publishes the specified event to the current set of registered analytics handlers.
Link copied to clipboard
Removes all handlers that are currently registered with client.
Link copied to clipboard
Removed the specified handler to the set of handlers that will be notified when an analytics event is received.
Link copied to clipboard
open fun setBacklogLimit(backlogLimit: Long)
Sets the maximum size of the analytics events backlog, expressed as total number of bytes.
Link copied to clipboard
open fun setBatchSize(batchSize: Int)
Sets the maximum number of events that will be processed in a batch when transmitting backlog.
Link copied to clipboard
open fun setNetworkEnabled(type: Int, enabled: Boolean): Boolean
Sets whether the specified network type is enabled for transmission of analytics events.
Link copied to clipboard
open fun setRetryLimit(retryLimit: Int)
Sets the maximum number of attempts that will be made to send NORMAL events.