Highlighted

Suspend Android app on exit

New Here ,
Feb 20, 2015

Copy link to clipboard

Copied

I got a suggestion from a customer concerning my Android app. When you exit the app, it continues to play in the background (unlike iOS). I would like to add functionality to the app (game) to pause (suspend) on exit. I tried some different coding version with out luck. The Android tablet (and phones) I test it on ignores the code and the games timer continues to tick down. I'm using Flash Pro CC with AS3. Not sure what the problem could be at this point!

TOPICS
Air beta

Views

591

Likes

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

Suspend Android app on exit

New Here ,
Feb 20, 2015

Copy link to clipboard

Copied

I got a suggestion from a customer concerning my Android app. When you exit the app, it continues to play in the background (unlike iOS). I would like to add functionality to the app (game) to pause (suspend) on exit. I tried some different coding version with out luck. The Android tablet (and phones) I test it on ignores the code and the games timer continues to tick down. I'm using Flash Pro CC with AS3. Not sure what the problem could be at this point!

TOPICS
Air beta

Views

592

Likes

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
Feb 20, 2015 0
Advocate ,
Feb 20, 2015

Copy link to clipboard

Copied

In your case if you want just pause its add event listener fir app deactivate and activate and start and stop your timers also set stage framerate to 1

Likes

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
Reply
Loading...
Feb 20, 2015 0
Adobe Community Professional ,
Feb 20, 2015

Copy link to clipboard

Copied

Your app would get rejected in some stores, certainly the Samsung one. The basics are that you have deactivate and activate listeners, and those need to pause your game. For some of my apps all I need to do is make the sound volume be zero, then on activate I set the volume back to what it was before. If you have more complex game play you would want to have a pause button anyway, and the deactivate event would just call the same routines that the pause buttons uses.

Likes

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
Reply
Loading...
Feb 20, 2015 0