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

# AmbientManager.TransitionDetails


`
public
static


interface
AmbientManager.TransitionDetails
`


`


`

|---|
| com.google.wear.services.ambient.AmbientManager.TransitionDetails |

<br />

*** ** * ** ***

Details provided to `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.AmbientTransitionListener#onStartAmbientTransition(com.google.wear.services.ambient.AmbientManager.TransitionDetails,%20com.google.wear.services.ambient.AmbientManager.AmbientTransitionFinishedNotifier)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_AMBIENT` When always-on-display is enabled, this denotes a transition destination that ends in ambient mode, where the display is dozing in a low-power state, but the last activity is still visible, showing a layout suitable for low power mode. |
| `int` | `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_INTERACTIVE` When always-on-display is enabled, this represents a transition from ambient mode to fully interactive mode, with the display on. |

| ### Public methods ||
|---|---|
| ` abstract long` | ` https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#getMaxTransitionDurationMillis()() ` Current ambient transition should consider this value (in ms) as the maximum available duration. |
| ` abstract int` | ` https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#getTransitionDirection()() ` Check the end-point/destination for the transition. |

## Constants

### TRANSIT_TO_AMBIENT

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

```
public static final int TRANSIT_TO_AMBIENT
```

When always-on-display is enabled, this denotes a transition destination that ends in
ambient mode, where the display is dozing in a low-power state, but the last activity is
still visible, showing a layout suitable for low power mode.

<br />

Constant Value:

1
(0x00000001)


### TRANSIT_TO_INTERACTIVE

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

```
public static final int TRANSIT_TO_INTERACTIVE
```

When always-on-display is enabled, this represents a transition from ambient mode to
fully interactive mode, with the display on.

<br />

Constant Value:

2
(0x00000002)


## Public methods

### getMaxTransitionDurationMillis

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

```
public abstract long getMaxTransitionDurationMillis ()
```

Current ambient transition should consider this value (in ms) as the maximum available
duration. If the transition takes longer than the specified time, the transition will
receive the `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.AmbientTransitionListener#onCancelAmbientTransition(boolean)` callback
(with `true`, signifying timeout). Any UI updates made after this point are not
guaranteed to draw as the system will proceed to complete the ambient state change.

Note that if the transition completes before the specified duration, components should
fire the `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.AmbientTransitionFinishedNotifier#notifyFinished()` callback to signify
early completion, allowing the system to proceed to the state change without delay.

<br />

| Returns ||
|---|---|
| `long` | a value representing the maximum duration (in ms) to use for the current transition or -1 if no duration is set. <br /> |

### getTransitionDirection

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

```
public abstract int getTransitionDirection ()
```

Check the end-point/destination for the transition. For example, when always-on-display
is enabled, the ambient entry state change is accompanied by a transition whose end point
is `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_AMBIENT`.

<br />

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails` value representing the possible transition end points. Possible values include: - `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_AMBIENT` - `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_INTERACTIVE` . Value is one of the following: - `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_AMBIENT` - `https://developer.android.com/reference/com/google/wear/services/ambient/AmbientManager.TransitionDetails#TRANSIT_TO_INTERACTIVE` |