BackgroundEventListener

Implements an EventListener and calls processEvent on a background thread. By default, EventListener calls processEvent on the main thread. This class is useful for custom analytics implementation, or other types of event handlers that need to do work on a background thread (typically to make network calls). When extending this class, destroyBackgroundThreadmust be called when this class is no longer needed. Otherwise, if this method is not called, the background thread will live on until the app it is running in, is terminated.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun backgroundProcessEvent(event: Event)
Process a given event to some purpose.
Link copied to clipboard
Stops and destroys the background thread.
Link copied to clipboard
fun processEvent(event: Event)
Process a given event to some purpose.