Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

AmbientController

class AmbientController
kotlin.Any
   ↳ androidx.wear.ambient.AmbientModeSupport.AmbientController

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 Activity to AmbientModeSupport.

Summary

Public methods
Boolean

Unit

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

Unit

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

Public methods

isAmbient

fun isAmbient(): Boolean
Return
Boolean true if the activity is currently in ambient.

setAmbientOffloadEnabled

fun setAmbientOffloadEnabled(enabled: Boolean): Unit

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

setAutoResumeEnabled

fun setAutoResumeEnabled(enabled: Boolean): Unit

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.