BackgroundService
Defines events for background web platform features.
Types
Link copied to clipboard
@Serializable
Link copied to clipboard
@Serializable
Called with all existing backgroundServiceEvents when enabled, and all new events afterwards if enabled and recording.
Link copied to clipboard
Link copied to clipboard
A key-value pair for additional event information to pass along.
Link copied to clipboard
@Serializable
Called when the recording state for the service has been updated.
Link copied to clipboard
The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.
Link copied to clipboard
@Serializable
Link copied to clipboard
Link copied to clipboard
Properties
Functions
Link copied to clipboard
suspend fun clearEvents(args: BackgroundService.ClearEventsParameter, mode: CommandMode = CommandMode.DEFAULT)
Clears all stored data for the service.
Link copied to clipboard
suspend fun setRecording(args: BackgroundService.SetRecordingParameter, mode: CommandMode = CommandMode.DEFAULT)
Set the recording state for the service.
Link copied to clipboard
suspend fun startObserving(args: BackgroundService.StartObservingParameter, mode: CommandMode = CommandMode.DEFAULT)
Enables event updates for the service.
Link copied to clipboard
suspend fun stopObserving(args: BackgroundService.StopObservingParameter, mode: CommandMode = CommandMode.DEFAULT)
Disables event updates for the service.