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

disable iOS auto-lock

New Here ,
May 14, 2011 May 14, 2011

Copy link to clipboard

Copied

@ 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

Views

1.8K

Translate

Translate

Report

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

Copy link to clipboard

Copied

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;

}

Votes

Translate

Translate

Report

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