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

Getting the application to exit when the user presses the Home button

New Here ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

I've got this, currently, but it doesn't seem to work:

               NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivateApp);
...
          protected function onDeactivateApp(event:Event):void
          {
               NativeApplication.nativeApplication.exit();
          }

Help?

TOPICS
Development

Views

391

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
Community Beginner ,
Feb 03, 2013 Feb 03, 2013

Copy link to clipboard

Copied

LATEST

For IOS the following addition to the application descriptor file should work

<iPhone>

                     <InfoAdditions>

      <![CDATA[<key>UIDeviceFamily</key><array><string>1</string><string>2</string></array><key>UIPrerenderedIcon</key><true/><key>UIApplicationExitsOnSuspend</key><true/>]]>

    </InfoAdditions>

 

  </iPhone>

The code you pasted works on my Nexus 7 Android app

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