Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.misc/ActivityManager

ActivityManager

interface 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

ActivityLifecycleType
Link copied to clipboard
enum ActivityLifecycleType : Enum<ActivityManager.ActivityLifecycleType>

Possible types of activity behaviour, which align with the possible events triggered by the android.app.Application.ActivityLifecycleCallbacks

ActivityStatus
Link copied to clipboard
data class ActivityStatus(val type: ActivityManager.ActivityLifecycleType, val activity: Activity, val timestamp: Long = getTimestampMilliseconds())

This class allows for activity events to be published as a Flow which can therefore be observed.

ApplicationStatus
Link copied to clipboard
sealed class ApplicationStatus

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

activities
Link copied to clipboard
abstract val activities: Observable<ActivityManager.ActivityStatus>

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.

applicationStatus
Link copied to clipboard
abstract val applicationStatus: Observable<ActivityManager.ApplicationStatus>

The current and future application status. This will initially be set to ApplicationStatus.Init until an activity is launched

Generated by Dokka
(c) Tealium 2026