开发者

how to save android application's global data to SavedSate

开发者 https://www.devze.com 2023-01-31 18:47 出处:网络
we all know how to save an Activity\'s state to SavedState viaonSaveInstanceState before it is killed.but when the application has some global data will be used by all the activities. s开发者_运维知识

we all know how to save an Activity's state to SavedState via onSaveInstanceState before it is killed. but when the application has some global data will be used by all the activities. s开发者_运维知识库o I do not have a good method to save the global data. when the application be killed on the backgound.


You can consider storing the data in the shared preferences. This data will persist across the activites. check this using shared preferences.

0

精彩评论

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