I have an app where you enter some data. The PRE-Honeycomb behavior is the following:
- back button seems to kill the app, all input data is lost
- home button seems to pause the app, all input data is still there after the next start of the app
For Honeycomb the behavior for the home button seems to have changed. After pressing the home button and start the app again all input data is lost. Is that intented? The problem is that I can override the back button to save data, but reading various posts I cannot override the home button. Is that an expected behavior or a bug? How to deal with it?
Any time your app is not visible, it is eligible to be stopped by the system. You shouldn’t assume anything about your app still running in the background if it’s been hidden. If you want to guarantee data is not lost, make sure you save it somewhere in
onPause()and restore it again inonResume().