Package 

Class AmbientAwareKt

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static <ERROR CLASS> LocalAmbientState
    • Method Summary

      Modifier and Type Method Description
      final <ERROR CLASS> getLocalAmbientState() AmbientState represents the current state of an ambient effect.
      final static Unit AmbientAware(Lifecycle lifecycle, Function1<AmbientState, Unit> content) Composable for general handling of changes and updates to ambient status.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • AmbientAware

        @Composable() final static Unit AmbientAware(Lifecycle lifecycle, Function1<AmbientState, Unit> content)

        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).

        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.