AmbientLifecycleObserver

Added in 1.3.0

public interface AmbientLifecycleObserver extends DefaultLifecycleObserver


Interface for LifecycleObservers which are used to add ambient mode support to activities on Wearable devices.

This interface can be implemented, or faked out, to allow for testing activities which use ambient support.

Summary

Nested types

Details about ambient mode support on the current device, passed to AmbientLifecycleCallback.onEnterAmbient.

Callback to receive ambient mode state changes.

Public methods

abstract boolean

Inherited methods

From androidx.lifecycle.DefaultLifecycleObserver
default void
default void
default void
default void
default void
default void

Public methods

isAmbient

Added in 1.3.0
abstract boolean isAmbient()
Returns
boolean

{@code true} if the activity is currently in ambient.