AmbientAware
fun AmbientAware(lifecycle: Lifecycle = LocalLifecycleOwner.current.lifecycle, content: @Composable (AmbientState) -> Unit)
Composable for general handling of changes and updates to ambient status. A new AmbientState is generated with any change of ambient state, as well as with any periodic update generated whilst the screen is in ambient mode.
This composable changes the behavior of the activity, enabling Always-On. See:
https://developer.android.com/training/wearables/views/always-on).Content copied to clipboard
It should be used within each individual screen inside nav routes.
Parameters
lifecycle
The Lifecycle of the activity or current owner such as NavBackStackEntry.
content
Lambda that will be used for building the UI, which is passed the current ambient state.