Added in version 33.1

AmbientComponentState.WatchFaceStateRegistry

public static final class AmbientComponentState.WatchFaceStateRegistry
extends Object

java.lang.Object
   ↳ com.google.wear.services.ambient.AmbientComponentState.WatchFaceStateRegistry


A state registry specifically intended for watch face components based on the wallpaper visibility. Components provide the AmbientManager with their visibility updates via the provided configuration method.

Watch faces can provide this integration following this example:

     void onCreate() {
         mMyWfStateRegistry = AmbientComponentState.makeWatchFaceRegistry();
     }

     @Override
     public void onVisibilityChanged(boolean visible) {
         super.onVisibilityChanged(visible);

         mMyWfStateRegistry.onVisibilityChanged(visible);
         ...
     }

 

Summary

Public methods

void onVisibilityChanged(boolean visible)

Indicate that the visibility of the watch face has changed.

Inherited methods

Public methods

onVisibilityChanged

Added in version 33.1
public void onVisibilityChanged (boolean visible)

Indicate that the visibility of the watch face has changed.

Parameters
visible boolean: true if the watch face is visible, otherwise false.