lifecyclePauseAPIs are used.
lifecycleStartAPI is called when a new session is started and it contains the lifecycle metrics as part of
lifecyclecontextdataand previous session information. For more information about the available metrics, see Lifecycle Metrics.
lifecyclePauseAPI is called, typically when the application goes to the background of the device.
lifecycleStartAPI 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.