public final class

AmbientModeSupport.AmbientController

extends java.lang.Object

 java.lang.Object

↳androidx.wear.ambient.AmbientModeSupport.AmbientController

Overview

A class for interacting with the ambient mode on a wearable device. This class can be used to query the current state of ambient mode. An instance of this class is returned to the user when they attach their to AmbientModeSupport.

Summary

Methods
public booleanisAmbient()

public voidsetAmbientOffloadEnabled(boolean enabled)

Sets whether this activity is currently in a state that supports ambient offload mode.

public voidsetAutoResumeEnabled(boolean enabled)

Sets whether this activity's task should be moved to the front when the system exits ambient mode.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public boolean isAmbient()

Returns:

true if the activity is currently in ambient.

public void setAmbientOffloadEnabled(boolean enabled)

Sets whether this activity is currently in a state that supports ambient offload mode.

public void setAutoResumeEnabled(boolean enabled)

Sets whether this activity's task should be moved to the front when the system exits ambient mode. If true, the activity's task may be moved to the front if it was the last activity to be running when ambient started, depending on how much time the system spent in ambient mode.