Package-level declarations

Types

Link copied to clipboard
@ObjCName(swiftName = "AttachedMonitor")
class AttachedMonitor

Handle to a live monitor subscription.

Link copied to clipboard
@ObjCName(swiftName = "Monitor")
interface Monitor

Observes every MonitorEvent emitted by an attached com.happycodelucky.backgrounder.BackgroundTaskManager.

Link copied to clipboard
@ObjCName(swiftName = "SnapshotPoller")
class SnapshotPoller(backgrounder: BackgroundTaskManager, interval: Duration)

Polls the inspector APIs (BackgroundTaskManager.scheduled / BackgroundTaskManager.diagnostics) on an interval and surfaces the latest snapshot through a StateFlow pair.

Functions

Link copied to clipboard
@ObjCName(swiftName = "attach")
fun BackgroundTaskManager.attachMonitor(scope: CoroutineScope, monitor: Monitor): AttachedMonitor

Attach a Monitor to BackgroundTaskManager.events. The collector coroutine runs on scope; cancelling either scope or the returned AttachedMonitor tears the subscription down.