SystemUiHostExtensionContext

data class SystemUiHostExtensionContext(val systemUiHost: SystemUiHost, val coreViewModel: CoreSystemUiViewModel, val lifecycleOwner: LifecycleOwner, val viewLifecycleOwner: LifecycleOwner, val viewModelStoreOwner: ViewModelStoreOwner, val iviServiceProvider: IviInstanceBoundIviServiceProvider, val registerOnBackPressedConsumersCallback: (List<OnBackPressedConsumer>) -> Unit, val staticConfigurationProvider: StaticConfigurationProvider)

Information about the environment that a SystemUiHostExtension runs in.

Parameters

systemUiHost

The SystemUiHost instance.

coreViewModel

The view model for the state of the system UI's core functionality.

lifecycleOwner

The lifecycle to which the system UI is bound. It is not stopped or destroyed when a theme change triggers view recreation, so don't provide this LifecycleOwner to views that are recreated at that time. Use viewLifecycleOwner instead.

viewLifecycleOwner

The lifecycle to which the system UI's view is bound. This lifecycle remains in the Lifecycle.State.CREATED state until theming is applied.

viewModelStoreOwner

Used for managing the system UI's view model(s).

iviServiceProvider

The IviServiceProvider that is bound to the IviInstanceId associated to the SystemUiHost. The IviServiceProvider can provide IVI service API instances that are bound the IviInstanceId, and global IVI service API instances.

registerOnBackPressedConsumersCallback

Callback to register a collection of components represented in the system UI, capable of handling back presses. Back presses are offered to the registered consumers in the same order that they were registered. Once a consumer consumes a back press, consumers that were registered after it will not get a callback. The registered consumers are bound to the current system UI view's lifecycle.

staticConfigurationProvider

Used to access static configuration.

Constructors

Link copied to clipboard
fun SystemUiHostExtensionContext(systemUiHost: SystemUiHost, coreViewModel: CoreSystemUiViewModel, lifecycleOwner: LifecycleOwner, viewLifecycleOwner: LifecycleOwner, viewModelStoreOwner: ViewModelStoreOwner, iviServiceProvider: IviInstanceBoundIviServiceProvider, registerOnBackPressedConsumersCallback: (List<OnBackPressedConsumer>) -> Unit, staticConfigurationProvider: StaticConfigurationProvider)

Properties