Announcement

Collapse
No announcement yet.

Prevent phone from entering sleep mode

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    In Blueprint there is a "Control Screensaver" node. Add this with "Allow Screen Saver" checkbox off.
    From code, use FPlatformMisc::ControlScreensaver(FPlatformMisc::EScreenSaverAction:isable).

    Comment


    • #3
      It worked, thanks a lot!!

      Comment


      • #4
        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.

        https://answers.unrealengine.com/que...erdisable.html
        Programmer, Rigger, Animator - Demo Reel 2015 - My RnD / WIP thread - www.dennylindberg.com
        Worked on: Kitten'd - Guardians of Valor (Android, iOS)

        Comment

        Working...
        X