mercredi 22 avril 2015

Android: What happens to the code when someone closes or kills an app?

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, then reopens app

Aucun commentaire:

Enregistrer un commentaire