---
title: "AmbientModeManager"
description: ""
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

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



```kotlin
public interface AmbientModeManager
```

## Functions

```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`, 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` that runs only when
`currentAmbientMode` is `AmbientMode.Ambient`.

#### Parameters

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




