SendableEvent

abstract class SendableEvent<TArgs : Any>(val elapsedMillis: Long = Clock.elapsedRealTime(), val timeZoneId: String = Clock.timeZone().id, val type: String? = null, val customProperties: MutableMap<String, String?> = mutableMapOf()) : Event

Abstract class for create custom sendable event.

Parameters

A custom data transfer object that the host app can define. It will be serialized by the ExperienceSDK using a JSON serializer and sent to the Experience Dashboard for further processing. Currently we use Google GSON for the serialization of custom arguments.
elapsedMillis

This parameter can be used to track events that actually happened before the method call. If you do not specify it, the ExperienceSDK will use the current time as the timestamp. To shift the timestamp, set this parameter to the amount of elapsed milliseconds since the last device boot at the actual time when the tracked event happened.

timeZoneId

The time zone ID, the default value is the one provided by the system.

type

The type of the event. This is a string that appears as the type field of the event JSON sent to the backend. By default, it is set to the non-qualified (simple) class name of the args parameter but you can override it to an arbitrary string that is not equal to any of the internal event types.

customProperties

Custom property map that will be attached to the event.

Constructors

Link copied to clipboard
fun SendableEvent(elapsedMillis: Long = Clock.elapsedRealTime(), timeZoneId: String = Clock.timeZone().id, type: String? = null, customProperties: MutableMap<String, String?> = mutableMapOf())

Functions

Link copied to clipboard
fun addCheckpoint(message: String)
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
abstract val args: TArgs
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: String? = null

Inheritors

Link copied to clipboard