Prevent phone from entering sleep mode

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?

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

It worked, thanks a lot!!

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.

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