Builder

class Builder

Fluent builder for EventTrackerConfig.

EventTrackerConfig.Builder()
.addAdapter(BackendBatchAdapter("https://api.example.com/v1/events"))
.addAdapter(FirebaseAdapter()) // requires :eventtracker-adapter-firebase
.batchSize(75)
.maxRetries(10)
.build()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Register a destination adapter. Adapters are called in registration order. At least one adapter is required by build.

Link copied to clipboard

Maximum age of a queued event before an automatic flush is triggered.

Link copied to clipboard

Maximum events per backend batch. Clamped to 1..1000.

Link copied to clipboard

Build the immutable EventTrackerConfig.

Link copied to clipboard

Enable SQLCipher encryption for the local database. Requires the host app to include the net.zetetic:android-database-sqlcipher dependency.

Link copied to clipboard
fun logger(logger: EventLogger): EventTrackerConfig.Builder

Provide a custom logger. Defaults to a no-op logger in production.

Link copied to clipboard

Hard cap on the local events table. Excess oldest rows are dropped.

Link copied to clipboard

Maximum HTTP delivery attempts before events are dead-lettered.

Link copied to clipboard

Set a per-event-name sampling rate.