开发者

Dynamic and persistent data

开发者 https://www.devze.com 2023-02-01 11:59 出处:网络
It is stated in documentation that onSaveInstanceState(Bundle) is called before placing the a开发者_如何学Pythonctivity in such a background state, allowing you to save away any dynamic instance state

It is stated in documentation that onSaveInstanceState(Bundle) is called before placing the a开发者_如何学Pythonctivity 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?


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号