I created a custom application class to keep global informations of my app.
I need to get those informations back after my application restarts from a crash. I don't need to store those informations in disk because is just info from the user current session, but if the app crashed, I should start exactly where the user was before the crash.
I thought in two ways to solve my problem: 1-Track the variables changes and always persist it in the SharedPreferences 2-Always save then in the activity saveInstance and retain then from the savedInstanceBundle
The problem with the solution 1 is an overhead in every change. The problem with solution 2 is that I need to serialize every info.
Do you guys know any other way to solve that problem? I only need to store when the app crashs and load back after starting from a crash. Just in those two scenarios.