AmplitudeAnalyticsService

Amplitude's lifecycle and identity, over an Amplitude the consumer owns.

Amplitude starts itself when it is constructed, from a Configuration you build — API key, server zone, autocapture and everything else it offers are set there. start only waits for that build to finish.

Before consent arrives, Amplitude collects. Its default is opted in. Build it opted out instead, and setEnabled opts in:

val amplitude = Amplitude(Configuration(apiKey, context, optOut = true))

Amplitude does not persist the opt-out: every launch starts from the Configuration, so re-apply the stored consent decision after start-up.

Constructors

Link copied to clipboard
constructor(amplitude: Amplitude)

Functions

Link copied to clipboard
open suspend override fun flush()
Link copied to clipboard
open suspend override fun identify(identity: Identity)
Link copied to clipboard
open suspend override fun reset()
Link copied to clipboard
open suspend override fun setEnabled(enabled: Boolean)
Link copied to clipboard
open suspend override fun start()