Copy link to clipboard
Copied
@ http://www.adobe.com/products/air/features/
we read :
---Begin
Disable auto-lock and screen dimming on the phone to prevent applications from going to sleep (useful, for example, in a video streaming application that doesn't require frequent user input).
---End
Any Idea how to disable auto-lock on iOS with air SDK 2.6?
Jrejory
Copy link to clipboard
Copied
You can test if you're on a mobile device, and set up listeners for when the app is activated:
if (Capabilities.cpuArchitecture == "ARM") {
NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate, false, 0, true);
}
Then on the activate one you could make the system stay awake:
private function handleActivate(event:Event):void {
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
}