Amplitude

open class Amplitude

Amplitude

This is the SDK instance class that contains all of the SDK functionality.

Many of the SDK functions return the SDK instance back, allowing you to chain multiple methods calls together.

Constructors

Link copied to clipboard
fun Amplitude(configuration: Configuration)

Public Constructor.

Functions

Link copied to clipboard
fun add(plugin: Plugin): Amplitude

Add a plugin.

Link copied to clipboard
open fun build(): Deferred<Boolean>
Link copied to clipboard
open fun createTimeline(): Timeline
Link copied to clipboard
fun flush()
Link copied to clipboard
fun groupIdentify(groupType: String, groupName: String, identify: Identify, options: EventOptions? = null): Amplitude
fun groupIdentify(groupType: String, groupName: String, groupProperties: Map<String, Any?>?, options: EventOptions? = null): Amplitude

Identify a group. You can modify group properties by calling this api.

Link copied to clipboard
fun identify(identify: Identify, options: EventOptions? = null): Amplitude

Identify lets you to send an Identify object containing user property operations to Amplitude server. You can modify user properties by calling this api.

fun identify(userProperties: Map<String, Any?>?, options: EventOptions? = null): Amplitude

Identify lets you set the user properties. You can modify user properties by calling this api.

Link copied to clipboard
fun logEvent(event: BaseEvent): Amplitude
Link copied to clipboard
fun logRevenue(revenue: Revenue): Amplitude
Link copied to clipboard
fun remove(plugin: Plugin): Amplitude
Link copied to clipboard
open fun reset(): Amplitude

Reset identity:

Link copied to clipboard
fun revenue(event: RevenueEvent): Amplitude

Log a Revenue Event.

fun revenue(revenue: Revenue, options: EventOptions? = null): Amplitude

Create a Revenue object to hold your revenue data and properties, and log it as a revenue event using this method.

Link copied to clipboard
fun setDeviceId(deviceId: String): Amplitude

Sets a custom device id. Note: only do this if you know what you are doing!

Link copied to clipboard
fun setGroup(groupType: String, groupName: Array<String>, options: EventOptions? = null): Amplitude

Sets the user's groups.

fun setGroup(groupType: String, groupName: String, options: EventOptions? = null): Amplitude

Set the user's group.

Link copied to clipboard
fun setUserId(userId: String?): Amplitude

Set the user id (can be null).

Link copied to clipboard
fun track(event: BaseEvent, options: EventOptions? = null, callback: EventCallBack? = null): Amplitude

Track an event.

fun track(eventType: String, eventProperties: Map<String, Any?>? = null, options: EventOptions? = null): Amplitude

Log event with the specified event type, event properties, and optional event options.

Properties

Link copied to clipboard
val amplitudeDispatcher: CoroutineDispatcher
Link copied to clipboard
val amplitudeScope: CoroutineScope
Link copied to clipboard
val configuration: Configuration
Link copied to clipboard
val isBuilt: Deferred<Boolean>
Link copied to clipboard
val logger: Logger
Link copied to clipboard
val networkIODispatcher: CoroutineDispatcher
Link copied to clipboard
val retryDispatcher: CoroutineDispatcher
Link copied to clipboard
lateinit var storage: Storage
Link copied to clipboard
val storageIODispatcher: CoroutineDispatcher
Link copied to clipboard
val store: State
Link copied to clipboard
val timeline: Timeline