# Prevent phone from entering sleep mode

**URL:** <https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [April 3, 2015, 11:18am UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321 "2015-04-03T11:18:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RFL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RFL](https://forums.unrealengine.com/u/RFL)\
**Post date:** [April 3, 2015, 11:18am UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321/1 "2015-04-03T11:18:10Z")

</div>

How do you prevent the phone from entering sleep mode? I see the apps request a permission to do it (WAKE\_LOCK), but how do I activate this option on my project?

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [April 3, 2015, 6:55pm UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321/2 "2015-04-03T18:55:33Z")

</div>

In Blueprint there is a “Control Screensaver” node. Add this with “Allow Screen Saver” checkbox off.  
From code, use FPlatformMisc::ControlScreensaver(FPlatformMisc::EScreenSaverAction::Disable).

---

<div class="post-metadata">

**Author:** ![RFL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RFL](https://forums.unrealengine.com/u/RFL)\
**Post date:** [April 8, 2015, 3:13pm UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321/3 "2015-04-08T15:13:17Z")

</div>

It worked, thanks a lot!!

---

<div class="post-metadata">

**Author:** ![Denny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denny](https://forums.unrealengine.com/u/Denny)\
**Post date:** [April 21, 2015, 10:14am UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321/4 "2015-04-21T10:14:57Z")

</div>

I just want to add a notice that this feature kills movie playback on Android, so other users ending up in this thread will know about it. See the issue below.

> **[\[Android, UMF\] FPlatformMisc::ControlScreensaver(Disable) breaks Unreal Media...](https://forums.unrealengine.com/questions/215236/android-umf-fplatformmisccontrolscreensaverdisable.html)**
>
> Engine Version: 4.7.5 Project Type: C++ Full Source Code: No Android Device: Samsung Galaxy Note 3 (SM-N9005) Android Version: 4.4.2 The Issue Note that this problem only happens on the Android device. PC/iOS is working fine. We are currently...

---

<div class="post-metadata">

**Author:** ![GreenHowitzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GreenHowitzer](https://forums.unrealengine.com/u/GreenHowitzer)\
**Post date:** [July 24, 2021, 11:43am UTC](https://forums.unrealengine.com/t/prevent-phone-from-entering-sleep-mode/26321/5 "2021-07-24T11:43:00Z")

</div>

Does not work for the Quest headset I need to figure out how to do this with the Oculus Quest sleep on host headset freezes game hige issue
