Investigate background and resume behavior
Record Android foreground and background transitions so you can interpret app events and telemetry around lifecycle changes.
Lifecycle evidence helps you see whether an issue happened while the app was visible, after it went into the background, or when it returned. The Android runtime tracks foreground/background state while active.
Automatic Capture
Ansight.initializeAndActivateDeveloperMode(
application = application,
clientName = "Android App",
)
The runtime registers activity lifecycle callbacks during activation.
Manual State
import ai.ansight.runtime.AppLifecycleState
AnsightRuntime.setAppLifecycleState(AppLifecycleState.Foreground)
AnsightRuntime.setAppLifecycleState(AppLifecycleState.Background)
Manual calls are useful when an app owns its lifecycle model or needs to correct route/lifecycle state from app code.