Lifecycle event reference
Events handled by Lifecycle
The following event is handled by the Lifecycle extension:
Lifecycle content request
This event represents a request to the Lifecycle extension to start or pause collecting data and is generated when the lifecycleStart and lifecyclePause APIs are used.
Event details
Data payload definition
The following key/value pair is used in the events:
actionstart/pauseadditionalcontextdataSample events
The following section displays sample lifecycle content requests.
Start Lifecycle request
{
"action": "start",
"additionalcontextdata": {
"key1" : "value1",
"key2" : "value2"
}
}
Pause Lifecycle request
{
"action": "pause"
}
Hub shared state
Lifecycle listens for the Configuration shared state events.
Events dispatched by Lifecycle
The following events are dispatched by the Lifecycle extension:
Lifecycle data content response
This event is a response from the Lifecycle module to notify lifecycle context data in which a client/module might be interested. If a callback has been registered, this event can be used to issue a callback to the user.
The event is generated by the Lifecycle extension, when the lifecycleStart API is called when a new session is started and it contains the lifecycle data as part of lifecyclecontextdata and previous session information. For more information about the available data, see Lifecycle Data.
Event details
com.adobe.eventType.lifecyclecom.adobe.eventSource.responseContentData payload definition
Here are the key-value pairs in this event:
lifecyclecontextdata<String,String>sessioneventstart response.starttimestampmillismaxsessionlengthlifecycle.sessionTimeout, which specifies the timeout for a paused session.previoussessionstarttimestampmillis0L .previoussessionpausetimestampmillis0L .Lifecycle application foreground
This event is a response from the Lifecycle extension to notify that the application is being displayed in the foreground. The event is generated by the Lifecycle extension when the lifecycleStart API is called, typically when the application comes to the foreground of the device.
data-variant=info
data-slots=text
data-variant=info
data-slots=text
lifecycleStart and lifecyclePause events to prevent dispatching of events due to switching between Android activities.Event details
Data payload
The Lifecycle application foreground data payload is defined by the Platform Mobile Lifecycle Details XDM field group, and includes information about the application, device, and environment when the event occurred. Please refer to Lifecycle Application Foreground data for a list of data included with this event.
Lifecycle application background
This event is a response from the Lifecycle extension to notify that the application is in the background.
The event is generated by the Lifecycle extension when:
- The
lifecyclePauseAPI is called, typically when the application goes to the background of the device. - The
lifecycleStartAPI is called without a previous call tolifecyclePause(such as when the application terminates unexpectedly). In this case, a Lifecycle Application Background event is dispatched just before the Lifecycle Application Foreground event, however the background event's timestamp is backdated to a time before the application previously went in the background.
data-variant=info
data-slots=text
data-variant=info
data-slots=text
lifecycleStart and lifecyclePause events to prevent dispatching of events due to switching between Android activities.Event details
Data payload
The Lifecycle Application Background data payload is defined by the Platform Mobile Lifecycle Details XDM field group, and includes information about the application close type and previous session length. Please refer to Lifecycle Application Background data for a list of data included with this event.