How to keep the screen awake in your Expo app, in short
Install expo-keep-awake, import useKeepAwake, and call it at the top of the screen component that should stay lit. That is the entire feature for most apps. While that screen is on screen, the phone ignores its auto-lock timer. When the user navigates away and the component unmounts, the lock is released and normal sleep comes back on its own.
This matters more than it sounds. A user following a recipe with flour on their hands, holding a plank during a workout timer, or showing a ticket at a gate will not tap the screen to keep it awake. If your app goes dark at the exact moment they need it, that is the moment they decide your app is annoying.
expo-keep-awake at a glance
| Question | Answer |
|---|---|
| Install | npx expo install expo-keep-awake |
| Works in Expo Go? | Yes |
| Platforms | Android, iOS, tvOS, web (limited) |
| Simplest API | useKeepAwake() inside a screen component |
| On and off control | activateKeepAwakeAsync(tag) and deactivateKeepAwake(tag) |
| Needed for video playback? | Usually no, expo-video keeps the screen on while playing by default |
Step 1: Install expo-keep-awake
Run npx expo install expo-keep-awake. Using expo install picks the version that matches your SDK, which on SDK 58 is the 58.0.x line. The module ships in Expo Go, so you can test it on a real phone straight away without making a new [development build](/blog/expo-go-vs-development-build).
There is no permission prompt to design and nothing to configure in app.json. That makes it one of the cheapest quality wins in the whole SDK, closer to [haptic feedback](/blog/how-to-add-haptic-feedback-to-your-expo-app) than to anything that touches user data.
Step 2: Use the useKeepAwake hook on one screen
Inside the screen component, call useKeepAwake() before you return your JSX. In an Expo Router app that means the file for the route itself, for example app/recipe/[id]/cook.tsx, not the root _layout.tsx. The hook keeps the screen awake for as long as the component that calls it is mounted.
- Put it on the focused, hands-busy screen: cook mode, the active workout, a reading view, a scanner, a boarding pass or ticket, a presentation or teleprompter.
- Keep it off browse screens. A feed or a settings page does not need to stay lit, and the user expects the phone to lock there.
- If the same screen has a paused state, like a timer that has finished, move the hook into a child component that only renders while the timer runs. Unmounting that child releases the lock.
Step 4: Handle the Android warning and the web
On Android, deactivating can throw an unhandled promise rejection when the original Activity is already gone, for example when the app is being torn down. The hook accepts an options object with suppressDeactivateWarnings: true to stop that exception. If you see a red box about keep awake while closing the app in development, that is the setting you want.
On the web, support is limited. isAvailableAsync() returns true on every platform except unsupported web browsers, so if your Expo app also ships to the web, check it before you show any Keep Screen On toggle. The addListener function and the listener option only do anything on the web, where the lock can be released when the user switches tabs. On native they are a no-op, so do not build logic on them for iOS or Android.
Step 5: Do not double up with video and audio
If the screen is a [video player](/blog/how-to-add-video-to-your-expo-app) built on expo-video, you likely do not need this module at all. The player's keepScreenOnWhilePlaying property defaults to true, so the screen stays on during playback and sleeps after it. On Android that only applies while a VideoView is visible, so use expo-keep-awake if you need the screen on with no video view showing.
For [audio](/blog/how-to-add-audio-to-your-expo-app), keeping the screen awake is usually the wrong goal. People listening to a lesson or a sleep sound want to lock the phone and keep listening. That is background audio, a different setting, and keeping the screen lit for it only burns battery.
A related touch for ticket and QR screens: users also expect the screen to be bright. That is a separate module, [expo-brightness](/blog/how-to-control-screen-brightness-in-your-expo-app), and the two pair well on a boarding pass screen.
Have Claude Code build it for you
Open your project in the Claude Code desktop app and name the exact screen. Left alone, AI-written code tends to put the hook in the root layout, use the deprecated activateKeepAwake, or mix tags so the lock never releases. A prompt that avoids all three:
Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "Keep awake: useKeepAwake only on focused screens (cook mode, active workout, tickets), never in a layout" so a later session does not undo it.
The short version
To keep the screen awake in your Expo app: install expo-keep-awake, call useKeepAwake() in the one screen that needs it, and let unmounting release it. Use activateKeepAwakeAsync and deactivateKeepAwake with one tag per feature when the lock should follow a timer, suppress the Android deactivate warning, check isAvailableAsync on the web, and leave video playback to expo-video.
If you are building your first iOS app with Claude Code and Expo and want feedback on it before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the [curriculum](/curriculum) covers the full path from first build to first users. If you are adding more native polish, our guides to [locking screen orientation](/blog/how-to-lock-screen-orientation-in-your-expo-app) and [haptic feedback](/blog/how-to-add-haptic-feedback-to-your-expo-app) follow the same pattern. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
How do I stop the screen from sleeping in an Expo app?
Install expo-keep-awake with npx expo install expo-keep-awake and call useKeepAwake() at the top of the screen component that should stay on. The screen will not sleep while that component is mounted, and normal sleep returns when it unmounts.
Does expo-keep-awake work in Expo Go?
Yes. expo-keep-awake is included in Expo Go and needs no permission or app.json config, so you can test it on a real phone right away.
What is the difference between useKeepAwake and activateKeepAwakeAsync?
useKeepAwake keeps the screen awake for as long as the component that calls it is mounted and releases automatically. activateKeepAwakeAsync turns the lock on until you call deactivateKeepAwake with the same tag, which suits timers and sessions that start and stop on one screen.
Why is my screen still not sleeping after I called deactivateKeepAwake?
Each tag is a separate lock. The screen only sleeps again after every activated tag has been deactivated, so a call with a different tag, or a mounted component still using useKeepAwake, will keep it on. Use one tag constant per feature for both calls.
Do I need expo-keep-awake for video playback?
Usually not. expo-video's keepScreenOnWhilePlaying defaults to true, so the screen stays on while a video plays. On Android that only applies while a VideoView is visible, so use expo-keep-awake if you need the screen on without one.
Is activateKeepAwake deprecated?
Yes. Use activateKeepAwakeAsync instead, paired with deactivateKeepAwake, or use the useKeepAwake hook, which handles both for you.
Last reviewed by David on November 3, 2026

