Preventing screen timeouts using Adobe AIR for Android and iOS mobile devices

I have a clean AS3 application that I am deploying on both Android and iOS. In some cases, I need the screen to not turn off for 60 seconds. Is there a way to do this with AIR for mobile?

+6
source share
1 answer

I used

// no dimming NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE; 

to disable the screen timeout for my application. don’t know if you can turn it on and off while the application is running ?!

tested it only on Android ... but should work on iOS too.

+25
source

Source: https://habr.com/ru/post/893420/