LoggingAdapter

Debug adapter that logs every event to Logcat. accepts returns false in release builds so it is automatically disabled in production.

Since

1.0.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val id: String

Stable, unique identifier for this destination (e.g. "firebase", "backend").

Functions

Link copied to clipboard
open override fun accepts(event: TrackEvent): Boolean

Decide whether this adapter wants the given event.

Link copied to clipboard
open suspend override fun deliver(event: TrackEvent): DeliveryOutcome

Deliver a single event. Realtime adapters forward to their SDK here; batch adapters typically return DeliveryOutcome.Success immediately (the event is already persisted).

Link copied to clipboard
open suspend fun flush(): DeliveryOutcome

Called when in.singhangad.eventtracker.EventTracker.flush is invoked. Batch adapters should drain their queue here. Default is a no-op.

Link copied to clipboard
open suspend override fun identify(userId: String?, traits: Map<String, Any?>)

Forwarded user identification. Called when the host app calls in.singhangad.eventtracker.EventTracker.identify. Default is a no-op.

Link copied to clipboard
open override fun initialize(context: Context, logger: EventLogger)

Called once during in.singhangad.eventtracker.EventTracker.initialize. Use this to initialise any underlying SDK, open connections, or set up resources.

Link copied to clipboard
open fun onOptOut()

Called when the host opts out and local data is being cleared. Implementations should clear any locally cached user state.