App is left open for a long period of time in the background, when brought to front it crashes

243 views Asked by At

This problem happens when the user exits the app but doesn't quit the app. Then if the app is left in the background for too long it crashes when the user brings it to the front again. After the app crashes it relaunches the app, which is fine because no data is lost and it is very quick to get back to where the user was.

I pretty sure this problem is a result of the Garbage Collector recycling classes that were created in activities.

I not so concerned about fixing this problem as I don't really see it as much of a problem but I would like to keep the game from displaying the crash messages. It displays like 4 or 5 "app has crashed. send a report". And you have to hit yes or no to get through all of them before the app relaunches. Not only is this annoying for users but it also creates a lot of crash reports in my console that aren't a real concern.

My idea for a solution to my problem would be to catch these null pointers (the first always occurs at the same point) and then relaunch the app. But how do you completely quit and relaunch an app?

0

There are 0 answers