开发者

Android data storage

开发者 https://www.devze.com 2023-02-05 09:48 出处:网络
Hi in my application i have temporary data , currently am using application context for saving these data, but the problem comes when my app put in to background, i loss the data and my application c

Hi in my application i have temporary data , currently am using application context for saving these data, but the problem comes when my app put in to background, i loss the data and my application crashing. any way to solve 开发者_StackOverflow社区this problem. With the normal flow i don't get any problem, these problem comes when my app put in to background for long time,when resumes app crashing.


It sounds like you need to persist your data when it's paused and repopulate your data when you resume your application.

You might want to take a look at the Component Lifecycles section of the Android documentation to figure out what would work best for your app.

0

精彩评论

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

关注公众号