I have been looking into storing data for my app and trying to choose between different methods (onSaveInstanceState, onPause/onResume) and different methods of storing(states in onSaveInstanceState, SQLite, Prefences).
I am curious what happens to each of these methods of storing when the user does certain things. In specific, I want to know what methods are called and what data is wiped when:
- User clicks the task switcher button(bottom right) and then closes the overlay within seconds, all from within the app
- User clicks home without swiping out app from task switcher, then reopens app
- User clicks home, swipes out the app from task switcher, then reopens app
- User exits app, restarts phone, then opens app
- User exits app, and uses Clean Master(or any other storage manager) to clear the cache of all apps or kill all background tasks, then reopens app.
- User updates app