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

Suspend Android app on exit

New Here ,
Feb 20, 2015 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

659

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

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

Copy link to clipboard

Copied

LATEST

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.

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