ActivityManager
Shared utility class for monitoring the current lifecycle state of a running application.
This class should provide all Tealium instances with the current application status in terms of whether it is currently foreground or backgrounded. In addition, it should provide information enough to calculate the lifecycle metrics produced by the Lifecycle module.
Types
Possible types of activity behaviour, which align with the possible events triggered by the android.app.Application.ActivityLifecycleCallbacks
This class allows for activity events to be published as a Flow which can therefore be observed.
Possible states for the application status. The application should only be in Init state before an activity is on show. After which point, the only possible states should be Foregrounded or Backgrounded
Properties
An Observable of all activity updates - this property will buffer the ActivityStatus updates for a while to ensure all Activities are captured (required to maintain correct foregrounding/backgrounding calculation) but also for possible AutoTracking that will need a reference to actual Activity instance.
The current and future application status. This will initially be set to ApplicationStatus.Init until an activity is launched