Edit in GitHubLog an issue

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

Event TypeEvent SourcePairedDirection
com.adobe.eventType.lifecycle
com.adobe.eventSource.requestContent
No
N/A

Data payload definition

The following key/value pair is used in the events:

KeyValue TypeRequiredDescription
action
String
Yes
Represents the lifecycle action type and can be one of these values: start/pause
additionalcontextdata
Map
No
Map that contains the user-supplied context data.

Sample events

The following section displays sample lifecycle content requests.

Start Lifecycle request

Copied to your clipboard
{
"action": "start",
"additionalcontextdata": {
"key1" : "value1",
"key2" : "value2"
}
}

Pause Lifecycle request

Copied to your clipboard
{
"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

Event TypeEvent SourcePairedDirection
com.adobe.eventType.lifecycle
com.adobe.eventSource.responseContent
No
N/A

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
lifecyclecontextdata
Map<String,String>
Yes
The value is a map of the key-value pairs that are generated by Lifecycle. This data can be consumed by other modules that operate on the data.
sessionevent
String
Yes
The type of event which triggered a start response.
starttimestampmillis
Long
Yes
The start timestamp of the new session.
maxsessionlength
Long
Yes
Maximum time in milliseconds before a session times out. The value is currently set to 7 days. This key is different from the configuration parameter, lifecycle.sessionTimeout, which specifies the timeout for a paused session.
previoussessionstarttimestampmillis
Long
Yes
The previous session's start timestamp. If there was no previous session, the value could be 0L .
previoussessionpausetimestampmillis
Long
Yes
The previous session's pause timestamp. If there was no previous session, the value could be 0L .

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.

Event details

Event TypeEvent Source
com.adobe.eventType.lifecycle
com.adobe.eventSource.applicationLaunch

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 lifecyclePause API is called, typically when the application goes to the background of the device.
  • The lifecycleStart API is called without a previous call to lifecyclePause (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.

Event details

Event TypeEvent Source
com.adobe.eventType.lifecycle
com.adobe.eventSource.applicationClose

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.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.