<div class='sourceset sourceset-android'>Android</div>

```kotlin
public interface AmbientModeManager
```

## Functions

<h2 id="withambienttick-block">withAmbientTick</h2>

```kotlin
public suspend fun withAmbientTick(block: () -> Unit)
```

Suspends the calling coroutine and waits for the next delivered "ambient tick".

When the device is in [AmbientMode.Ambient](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/AmbientMode.Ambient), the system only provides updates at infrequent
intervals (typically once per minute) to preserve battery life. This function allows a
coroutine to pause and resume execution specifically when that tick is received.

The provided `block` will be executed synchronously when the tick occurs, and any state
updates performed within it will be reflected on the ambient screen.

This function should typically be used within a looping [LaunchedEffect](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/LaunchedEffect) that runs only when
`currentAmbientMode` is [AmbientMode.Ambient](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/AmbientMode.Ambient).

#### Parameters

| | |
| --- | --- |
| block | The state update logic to execute immediately upon receiving the ambient tick. |