How to use "wake lock" permission under Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By braniii

I exported my program to Android. The only permission I granted (in the export gui menu) is “Wake Lock”. Checking in Android I can confirm, that the App has the permission “keep awake”. My problem is, that the app never make use of it.

Is there a function I need to call, to keep the system awake?

I’m using Godot: 3.0.2 latest (Arch)
And Android 7.1 (with multiple devices)

Thank you for your help.

:bust_in_silhouette: Reply From: endragor

In your project settings under Display → Window check the “Keep Screen On” box.

Thank you for your help. Sadly this box was checked already (I didn’t remember that I changed this setting some weeks ago). So if this is all I should do, I guess it is a bug.

braniii | 2018-05-03 12:21

Did you ever figure this out? On Android, if the player hasn’t touched screen in a while, the screen locks. Is there a way to keep it from doing that?

tproper | 2018-10-14 02:44