# AmbientMode.AmbientCallbackProvider

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

*** ** * ** ***


```
public interface AmbientMode.AmbientCallbackProvider
```

<br />

*** ** * ** ***

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

Interface for any `https://developer.android.com/reference/android/app/Activity.html` that wishes to implement Ambient Mode. Use the `https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallbackProvider#getAmbientCallback()` method to return and `https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallback` which can be used to bind the `https://developer.android.com/reference/androidx/wear/ambient/AmbientMode` to the instantiation of this interface.

```
return new AmbientMode.AmbientCallback() {
    public void onEnterAmbient(Bundle ambientDetails) {...}
    public void onExitAmbient(Bundle ambientDetails) {...}
 }
```

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallback` | `[getAmbientCallback](https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallbackProvider#getAmbientCallback())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### getAmbientCallback

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

```
abstract AmbientMode.AmbientCallback [getAmbientCallback](https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallbackProvider#getAmbientCallback())()
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallback` | the `https://developer.android.com/reference/androidx/wear/ambient/AmbientMode.AmbientCallback` to be used by this class to communicate with the entity interested in ambient events. |