EventWithArgs

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

Abstract class for create custom sendable event with arguments.

Parameters

args

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 <TArgs : Any> EventWithArgs(args: TArgs, 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
open override val args: TArgs
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: String?

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard