Android data storage
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.
精彩评论