• 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 Minimizing and reopening the game causes it to restart

P

psychoanima

Guest
I can't understand why is this happening. Developer mode is turned off. If i just minimize and reopen the game it will restart...

It's really frustrating because I don't know if it has to do something with my app or my android device?
 
M

McWolke

Guest
do you use any surface? surfaces get lost after minimizing the game, if you don't check if a surface exists before drawing it, the game will crash.
but this is just an assumption, you have to provide some more information, like the crash message.
 
J

jackhigh24

Guest
mines ok when i do that, instead of a restarting, it pauses the game and carries on when im back on it, although iv got dev turned on if that makes a difference, so maybe its that or your phone, turn dev on and see and if that does not work test on another phone, if they dont work come back and tell us, but iv not seen that my self.

EDIT
also im not sure how to minimize or how your doing it, on my phone i just swiped from very top edge going down it pulls a little bar out, then swipe down again on that and it gives a list of things you can set on like wifi and that, it also has a settings cog i click that and it goes to the proper phone setting page where you have everything you can set, so thats what id called minimize out of game.
 
P

psychoanima

Guest
Ok, I did further research on the net, and found out that I am not the only one who's facing this problem.

The problem is in android devices. It's some kind of memory management on low end android phones, so every time you minimize/maximize the app, it will restart. Also, I've downloaded random games on Play store, and minimization and reopening also restarted that apps.

Really stupid memory management from android side but that's how it is. Maybe exist some kind of code that can be added in android manifest to solve that problem, who knows...
 
J

jackhigh24

Guest
how low end a device was that as iv got a sony xperia e1 and that very low, let me know what your device is so i can compare specs then test my game for the same
 
I

icuurd12b42

Guest
Hmm, personally all my aps "restart" when you switch back to them. I dont think the term minimized applies in android. some go back to where I left them but it clearly looks like they are restarting.
 
P

psychoanima

Guest
how low end a device was that as iv got a sony xperia e1 and that very low, let me know what your device is so i can compare specs then test my game for the same

1.2 Ghz Quad Core ARM Cortex A7
Mali-400
512 mb of ram
 
P

psychoanima

Guest
Hmm, personally all my aps "restart" when you switch back to them. I dont think the term minimized applies in android. some go back to where I left them but it clearly looks like they are restarting.
On my (and only) android device that I am using for testing, minimize/maximize restarts the game like you have just start it (from splash screen). Which is stupid, if I click on interstitial and want to continue the game - good bye saved level/score
 
I

icuurd12b42

Guest
On my (and only) android device that I am using for testing, minimize/maximize restarts the game like you have just start it (from splash screen). Which is stupid, if I click on interstitial and want to continue the game - good bye saved level/score
Well you should show ads where is does not matter if you quit the game. but I believe some ads are shown and interactible in game while other, such as one that launch a browser, will make the game quit
 
P

psychoanima

Guest
Well you should show ads where is does not matter if you quit the game. but I believe some ads are shown and interactible in game while other, such as one that launch a browser, will make the game quit
Luckily, I did like that in my game - highscore is saved before ads shown up, but in general, each time game to restart when you minimize it is ridiculous

p.s. icuurd, when SpriteStudio API is going to be updated?
 
I

icuurd12b42

Guest
p.s. icuurd, when SpriteStudio API is going to be updated?
I been sortof stuck between being sick and the launch of space ranger on steam. but I have example projects from sprite studio I'm hoping to update the API soon when I get better
 
J

jackhigh24

Guest
well something must be wrong for both of you then, as mine is lower than that, here's its specs

OS: Android OS, v4.3 (Jelly Bean)
Chipset: Qualcomm MSM8210 Snapdragon 200
CPU: Dual-core 1.2 GHz Cortex-A7
GPU: Adreno 302
RAM: 512MB

i use heyzap ad network can do interstitial, reward, banner, video and they can click on game advertised install it and then press back button and their back in the game where they last were, or if they minimize or what ever you call it, they go strait back to same place in game by just shutting what ever they opened, works same for all my android phones so 4 of them.
 
I

icuurd12b42

Guest
It depends on the os. I run Lollipop and Next Launcher and the only stuff that seem to run in multitask mode is my contacts and the phone app
 
J

jackhigh24

Guest
one of my other phones is android 5.1 works perfect, and another phone i bought about 3 weeks ago new but its up stairs so cant remember what android that is but works great
 
P

psychoanima

Guest
Mine is also running Lollipop. Every game from Play store is reacting the same after being minimized. Except programs (youtube, etc.).
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
This is a slightly old topic but it pops up first in search, so I'll leave an additional note here.
On current versions of Android, there's an option in Developer Options reading
Don't keep activities
Destroy every activity as soon as the user leaves it
upload_2017-7-18_22-23-16.png
For what can be considered as mysterious reasons, I had it enabled on my device, causing some confusion as to why small applications were getting unloaded despite there being a plenty of free memory.
 
Top