---
title: "keepScreenOn"
description: "A modifier that keeps the device screen on as long as it is part of the composition on supported
platforms.

This is useful for scenarios where the user might not be interacting with the screen frequently
but the content needs to remain visible, such as during video playback."
type: "modifier"
---

<div class='type'>Compose Modifier</div>

<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.keepScreenOn(): Modifier
```


A modifier that keeps the device screen on as long as it is part of the composition on supported
platforms.

This is useful for scenarios where the user might not be interacting with the screen frequently
but the content needs to remain visible, such as during video playback.



