# AmbientModeSupport.AmbientController

Artifact: [androidx.wear:wear](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/ambient/AmbientModeSupport.java+class:androidx.wear.ambient.AmbientModeSupport.AmbientController) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear#1.3.0)

*** ** * ** ***


```
inner class AmbientModeSupport.AmbientController
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

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 `https://developer.android.com/reference/android/app/Activity.html` to `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport`.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[isAmbient](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#isAmbient())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setAmbientOffloadEnabled](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#setAmbientOffloadEnabled(boolean))(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setAutoResumeEnabled](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#setAutoResumeEnabled(boolean))(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Deprecated in Java |

## Public functions

### isAmbient

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear#1.3.0)

```
fun [isAmbient](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#isAmbient())(): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the activity is currently in ambient. |

### setAmbientOffloadEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear#1.3.0)

```
fun [setAmbientOffloadEnabled](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#setAmbientOffloadEnabled(boolean))(enabled: Boolean): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

### setAutoResumeEnabled

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear#1.3.0)

```
fun [setAutoResumeEnabled](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController#setAutoResumeEnabled(boolean))(enabled: Boolean): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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.