In my app, I have a loading view that sets up the app by going out to an API and bringing back some startup info to store. I store it temporarily in an Application class. An example of the type of data is lets say a list of servicable cities.
The flow is:
Loading View -> Main Menu -> etc etc
If I exit out of the app and come back, it usually starts with Main Menu view and hits onresume and everything is fine. But sometimes if I wait a while and the OS clears some memory maybe, I come back and it again goes to Main Menu but this time starts from scratch for that view by calling onCreate. But it seems like the application data is wiped.
I am just wondering why, if it is wiping the application data, is it not just starting up the app from scratch?
Is there some directive in the manifest I can make to make it do this? Keep in mind, I dont want it to restart the app when coming back into the app from a pause. Only when the OS has cleared the application data...