> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Keep screen on

> Keep the device screen from dimming or locking while your app is in the foreground, and restore normal behavior with the JavaScript Bridge.

The keep screen on JavaScript Bridge method lets you override the device's default screen-lock/timeout behavior so the screen stays awake while your app is in the foreground. It's part of Median's [device screen control](https://docs.median.co/docs/device-screen-control) feature set, alongside [screen brightness](https://docs.median.co/docs/screen-brightness.md) and [full screen](https://docs.median.co/docs/full-screen.md).

> [!TIP]
>
> **Test  with our demo page**
>
> We host a ready-made demo page at
>
> that calls the  features through the Median JavaScript Bridge.
> Load it inside your Median app during development, either by setting it
> as your app's website URL in App Studio or by navigating to it from your
> own site, and use it to confirm  works on a real device before
> you add it to your own pages.
>
> The demo page only works inside a Median app with  enabled.
> Opened in a regular mobile or desktop browser, the native features
> won't respond. Remember to switch your app back to your own URL before
> release.

## Why use keep screen on

* **Navigation and map apps**: Keep turn-by-turn directions or live tracking visible on screen during a trip, without users having to keep tapping to wake the device.
* **Presentation and kiosk displays**: Hold a screen awake indefinitely for signage, in-store kiosks, or presentation mode where no one is actively touching the device.
* **QR code and barcode display**: Keep a boarding pass, ticket, or payment QR code visible long enough to be scanned, even if the user pauses before presenting it.
* **Fitness and workout sessions**: Keep workout timers, stats, or instructional content visible throughout an active session without the screen dimming or locking.

## JavaScript Bridge implementation

### Enable keep screen on

Prevents the device screen from locking or dimming while your app is active.

Median JavaScript Bridge

```javascript JavaScript  theme={null}
median.screen.keepScreenOn(); 
```

### Disable keep screen on

Returns the screen to the device's normal lock/timeout behavior.

Median JavaScript Bridge

```javascript JavaScript  theme={null}
median.screen.keepScreenNormal(); 
```


## Related topics

- [Device screen control](https://docs.median.co/docs/device-screen-control.md)
- [Screen brightness](https://docs.median.co/docs/screen-brightness.md)
- [Changelog archive](https://docs.median.co/docs/changelog-archive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.