• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Game restarts after returning from a minimized state.

RyanC

Member
Since updating to GMS 2, my game restarts after returning from a minimized state on Android.

If I click "share link" and try and send an email or text then return to the game, it restarts.

But if I re-download the previous version from the play store it's fine.

I tried using GMS 1.4 and now that has the error in the Android builds too.

Any help greatly appreciated!
 
G

Guest

Guest
In Android, when you leave one app for another, the first app stays in memory until that memory is needed, and then it's cleared from memory and will be reloaded when you switch back. If you don't want your player to have to start over after they switch out of your game, then your game needs to have some kind of system for regularly saving data and allowing the player to continue when they return.

Edit: from the Android docs explaining this: https://developer.android.com/guide/components/activities/process-lifecycle
 
Last edited by a moderator:
Top