Lifecycle event reference

Events handled by Lifecycle

The following events are 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 Type

Event Source

Paired

Direction

com.adobe.eventType.lifecycle

com.adobe.eventSource.requestContent

No

N/A

Data payload definition

Here are the key-value pairs in this event:

Key

Value Type

Optional

Description

action

String

No

Represents the lifecycle action type and can be one of these values: start/pause

additionalcontextdata

Map

Yes

Map that contains the user-supplied context data.

Data sample - Start Lifecycle request

Here is an example of the event data for Lifecycle start request:

{ "action": "start", "additionalcontextdata":{ "key1" : "value1", "key2" : "value2" }}

Data sample - Pause Lifecycle Request

{ "action": "pause"}

Hub shared state

Lifecycle listens for the Configuration shared state events.

For more information about the shared state events, see Events Dispatched by SDK Core - Hub Shared State​.

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 metrics as part of lifecyclecontextdata and previous session information. For more information about the available metrics, see Lifecycle Metrics​.

Event details

Event Type

Event Source

Paired

Direction

com.adobe.eventType.lifecycle

com.adobe.eventSource.responseContent

No

N/A

Data payload definition

Here are the key-value pairs in this event:

Key

Value Type

Optional

Description

lifecyclecontextdata

Map<String,String>

No

The value is a map of the key-value pairs that are generated by Lifecycle. This data can be consumed by other modules that want to operate on the data.

sessionevent

String

No

The type of event which triggered a start response.

starttimestampmillis

Long

No

The start timestamp of the new session.

maxsessionlength

Long

No

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

No

The previous session's start timestamp. If there was no previous session, the value might be 0L .

previoussessionpausetimestampmillis

Long

No

The previous session's pause timestamp. If there was no previous session, the value might be 0L .