Android Closing app

zendraw

Member
So with game_end(); if you close the game its not really closed, but still runs the closing loop, so if you try to run the game again it runs the game_end(); code every time, so you have to close the game from the app settings if you want to run it again. how do i close the game so that its actually closed? is there such a way?
 

FoxyOfJungle

Kazan Games
There is no way to completely close Android applications. Instead, they just stay in the background. One solution is to restart the game whenever you call game_end().
 

gkri

Member
So with game_end(); if you close the game its not really closed, but still runs the closing loop, so if you try to run the game again it runs the game_end(); code every time, so you have to close the game from the app settings if you want to run it again. how do i close the game so that its actually closed? is there such a way?
Android engineers are not suggesting to force close the app, but let it eventually killed in background processes by the system. However, I have noticed some issues with game_end like the game crashes silently in background and if the user tries to return to app is not possible until manually terminate it and restart it.

I made an extension that it can send the game natively into background processes with java code, which resolves the issues of game_end(). The extension also offers the option to force stop the game (but better avoid to do that, unless you have a very good reason)...

After importing the extension just call android_game_minimize() for natively send the game into background processes or android_game_end() to terminate it (latter not recommended)

You can find the extension here
 
Top