BlueConicEventManager

Interface for the event manager

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun clearEvents()

Clears the event queue. This method is typically used when a new screen is loaded. The events from the previous screen have to be ignored.

Link copied to clipboard
abstract fun handleAllEvents()

Publishes all events that were in the event queue. These will be validated by the given listeners and happen after the onLoad. Used at a new PAGEVIEW after all listeners are activated, and onLoad is called.

Link copied to clipboard
abstract fun publish(event: Event, callback: Callback? = null)

Method to publish an event. An event handler can act on these events. For example: when the app developer throws an event "Video started", the engagement is increased in the Interest Ranker based on this event (because the marketer defined an event rule in the BlueConic UI).

Link copied to clipboard
abstract fun publishAdvancedEvent(eventName: String, context: List<String> = mutableListOf(), callback: Callback? = null)

Publishes an ADVANCED event with the given selector and context.

Link copied to clipboard
abstract fun publishClickEvent(selector: String, context: List<String> = mutableListOf(), callback: Callback? = null)

Publishes a CLICK event with the given selector and context.

Link copied to clipboard
abstract fun publishFormSubmitEvent(selector: String, context: List<String> = mutableListOf(), callback: Callback? = null)

Publishes a FORM SUBMIT event with the given selector and context.

Link copied to clipboard
abstract fun publishUpdateContentEvent(content: String, selector: String? = null, callback: Callback? = null)

Publishes a UPDATE CONTENT event with the content and selector.

Link copied to clipboard
abstract fun publishUpdateValuesEvent(selector: String, values: List<String>, callback: Callback? = null)

Publishes a UPDATE VALUES event with the selector and values.

Link copied to clipboard
abstract fun setBlueConicClient(client: BlueConicClient)

Sets the BlueConic client.

Link copied to clipboard
abstract fun subscribe(eventName: BlueConicEventManager.EventName, callbackObject: EventHandler, onlyOnce: Boolean = false, identifier: String = UUID.randomUUID().toString())

Subscribes an event handler for an event type.

abstract fun subscribe(className: String, callbackObject: EventHandler, onlyOnce: Boolean = false, identifier: String = UUID.randomUUID().toString())

Subscribes an event handler for an event class name.

Link copied to clipboard
abstract fun unsubscribe(identifier: String)

Unsubscribes an event handler for an event class name.