How to keep the screen awake


Hi! I would like to ask how I can keep the screen awake while I use my application inside Android, I found different solutions all out of dated.


A good start would be allowing the app to wake_lock the screen,

you can find that menu in:
Android > sketch permissions
I haven’t dont much testing with permissions (im fairly new to android processing) but maybe just having that box ticked keeps the phone awake



Useful start point @DogeMastr
this permission seems to be used to keep the cpu on while the screen is off, however useful!


Check this:

I believe you need to include:

 import android.os.Bundle;
 import android.view.WindowManager;
 import android.view.View;




permissions is needed of course, but you have to ask by code:


creating a thread for that.

importing what is required (WindowManager, Activity…); dont forget to unlock when onPause().