# AmbientModeSupport.AmbientCallback

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#)  

# AmbientModeSupport.AmbientCallback

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static

abstract
class
AmbientModeSupport.AmbientCallback
`  
`

extends Object


``


`

|---|-----------------------------------------------------------------|
| java.lang.Object                                                   ||
| ↳ | android.support.wear.ambient.AmbientModeSupport.AmbientCallback |

<br />

*** ** * ** ***

Callback to receive ambient mode state changes. It must be used by all users of AmbientMode.

## Summary

|                                                                                    ### Public constructors                                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[AmbientModeSupport.AmbientCallback](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#AmbientModeSupport.AmbientCallback())`() ` |

|                                                                                                                                                   ### Public methods                                                                                                                                                    ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onEnterAmbient](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#onEnterAmbient(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` ambientDetails) ` Called when an activity is entering ambient mode. |
| ` void` | ` `[onExitAmbient](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#onExitAmbient())`() ` Called when an activity should exit ambient mode.                                                                                                             |
| ` void` | ` `[onUpdateAmbient](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#onUpdateAmbient())`() ` Called when the system is updating the display for ambient mode.                                                                                          |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### AmbientModeSupport.AmbientCallback

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
AmbientModeSupport.AmbientCallback ()
```

<br />

<br />

## Public methods

### onEnterAmbient

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onEnterAmbient (Bundle ambientDetails)
```

Called when an activity is entering ambient mode. This event is sent while an activity is running (after onResume, before onPause). All drawing should complete by the conclusion of this method. Note that`invalidate()`calls will be executed before resuming lower-power mode.

<br />

|                                                                             Parameters                                                                             ||
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `ambientDetails` | `Bundle`: bundle containing information about the display being used. It includes information about low-bit color and burn-in protection. <br /> |

### onExitAmbient

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onExitAmbient ()
```

Called when an activity should exit ambient mode. This event is sent while an activity is running (after onResume, before onPause).

<br />

### onUpdateAmbient

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onUpdateAmbient ()
```

Called when the system is updating the display for ambient mode. Activities may use this opportunity to update or invalidate views.

<br />

-

  ## Interfaces

  - [AmbientMode.AmbientCallbackProvider](https://developer.android.com/reference/android/support/wear/ambient/AmbientMode.AmbientCallbackProvider)
  - [AmbientModeSupport.AmbientCallbackProvider](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallbackProvider)
-

  ## Classes

  - [AmbientMode](https://developer.android.com/reference/android/support/wear/ambient/AmbientMode)
  - [AmbientMode.AmbientCallback](https://developer.android.com/reference/android/support/wear/ambient/AmbientMode.AmbientCallback)
  - [AmbientMode.AmbientController](https://developer.android.com/reference/android/support/wear/ambient/AmbientMode.AmbientController)
  - [AmbientModeSupport](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport)
  - [AmbientModeSupport.AmbientCallback](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientCallback)
  - [AmbientModeSupport.AmbientController](https://developer.android.com/reference/android/support/wear/ambient/AmbientModeSupport.AmbientController)