1

It is stated in documentation that onSaveInstanceState(Bundle) is called before placing the activity in such a background state, allowing you to save away any dynamic instance state in your activity into the given Bundle. Note that it is important to save persistent data in onPause() instead of onSaveInstanceState(Bundle).

What is the best way to distinguish dynamic data with persistent?

Eugene
  • 59,186
  • 91
  • 226
  • 333

2 Answers2

2

Persistent data is data that must survive application restart, like user settings, etc..

Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • 1
    Conversely, dynamic data would be transient contents of forms and such. To draw an analogy with a popular Windows desktop app, persistent data is the Word document and dynamic data is what the user is typing into the find-and-replace dialog. – CommonsWare Dec 29 '10 at 21:31
1

Another way of looking at this: Dynamic data is only stored in RAM. Persistent data can survive device power-off.

Community
  • 1
  • 1
ateiob
  • 9,016
  • 10
  • 44
  • 55