# ShouldPauseCallback

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/PausableComposition.kt+class:androidx.compose.runtime.ShouldPauseCallback) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.8.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  fun interface ShouldPauseCallback
  ```

*** ** * ** ***

The callback type used in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/PausedComposition#resume(androidx.compose.runtime.ShouldPauseCallback)`.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ShouldPauseCallback#shouldPause()()` Called to determine if a resumed `https://developer.android.com/reference/kotlin/androidx/compose/runtime/PausedComposition` should pause. | Cmn |

## Public functions

### shouldPause

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.8.0)

```
fun shouldPause(): Boolean
```

Called to determine if a resumed `https://developer.android.com/reference/kotlin/androidx/compose/runtime/PausedComposition` should pause.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Return `true` to indicate that the composition should pause. Otherwise the composition will continue normally. |