Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

disable iOS auto-lock

New Here ,
May 14, 2011 May 14, 2011

@ http://www.adobe.com/products/air/features/

we read :

---Begin

Screen dimming (where applicable)

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

TOPICS
Development
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2011 May 15, 2011
LATEST

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;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines