Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
the event class has an activate and a deactivate events you can use.
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now