Screen Lifecycle Instrumentation
Generates: Spans
Automatically tracks Activity and Fragment lifecycle transitions, time spent on each screen, and app startup.
Configuration
Enabled by default. To disable:
PulseSDK.INSTANCE.initialize(
application = this,
apiKey = "your-api-key",
dataCollectionState = PulseDataCollectionConsent.ALLOWED,
) {
activity { enabled(false) }
fragment { enabled(false) } // Disable if not using fragments
}
note
App startup tracking (AppStart span) is powered by the activity instrumentation. Disabling activity { } will also disable app startup signals.
What Gets Tracked
App Startup
- Span Name:
AppStart pulse.type:app_start(cold starts only)start.type:cold,warm, orhot
Activity / Fragment Lifecycle
- Span Names:
Created,Resumed,Paused,Stopped,Destroyed pulse.type:screen_load(onCreatedspans)
Screen Sessions
- Span Name:
ActivitySession/FragmentSession pulse.type:screen_session- Measures total time a user spends on a screen
Attributes
| Attribute | Description | Always Present |
|---|---|---|
pulse.type | app_start, screen_load, or screen_session | ✅ |
activity.name | Activity class name | ⚠️ Activity spans only |
fragment.name | Fragment class name | ⚠️ Fragment spans only |
screen.name | Short screen name | ✅ |
last.screen.name | Previous screen | ⚠️ Resumed spans only |
start.type | Cold / warm / hot | ⚠️ AppStart only |