Wakeup forAndroid

Hello, has anyone found a simple way to block the automatic shutdown of the mobile phone display? I found something in an older post. But maybe there is an easier way now.


I saw that post you talk about and the solution is not easy.
I hope if i can help you like you did to me before but I’m beginner :smiling_face_with_tear:

Maybe if you make a little movement or action that is not noticeable to the eye every split second if the player does not perform any action for some time.

Thanks @Soup. I had the same idea, but the Android operating system is not that easy to trick.
I’ve found another, simpler way.
The only way, of course, only via Javascript. (I think I’ll have to deal with Javascript more in the future.)
I’ve only tested it on my smartphone so far. Have to test it on other devices. Or if there is someone here in the forum who would like to test it. Then give me a feedback.
Here is the javascript code:

function isScreenLockSupported() {
 return ('wakeLock' in navigator);
1 Like

just saw that my smartphone is still on. Definitely 20 minutes.