LifecycleMonitor

Provides methods to react to changes in the application environment

Properties

Link copied to clipboard
abstract val currentActivity: Activity?

Tracks the current activity of the host application.

Functions

Link copied to clipboard
abstract fun assignCurrentActivity(activity: Activity)

Explicitly sets the current activity. Intended for use in advanced scenarios where LifecycleMonitor cannot capture an activity's com.klaviyo.core.lifecycle.ActivityEvent.Started event.

Link copied to clipboard
abstract fun offActivityEvent(observer: ActivityObserver)

De-register an observer from onActivityEvent

Link copied to clipboard
abstract fun onActivityEvent(observer: ActivityObserver)

Register an observer to be notified when all application activities stopped