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

Android and iOS closing app?

Explorer ,
Jun 01, 2014 Jun 01, 2014

I am developing an app for Android and iOS and when I press the home button on my Android phone the game's thread is still running in the background.

The music keeps on going.

How can I detect when the user exits the app in order to stop the music or terminate the app's thread?
How can I terminate the app's thread?

TOPICS
ActionScript
444
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
Community Expert ,
Jun 02, 2014 Jun 02, 2014

the event class has an activate and a deactivate events you can use.

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
Enthusiast ,
Jun 03, 2014 Jun 03, 2014
LATEST

On iOS you add a UIApplicationExitsOnSuspend key to your app xml file like so:

<InfoAdditions>

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

    </InfoAdditions>

on Android it's a different story. See this:

android - Quitting an application - is that frowned upon? - Stack Overflow

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