karthikr wrote:
> Whenever I press the home button when Im in the root task of my
> application and when I click on the icon of my app again the state of
> my task (activity) is retained, but when i press the back button on
> the emulator and when I open my application its state is not retained.

The back button means "close up this activity", and so state is not
supposed to be retained.

> I want the state to be retained in both the scenarios.

Implement onDestroy() and persist your state to a flat file or SQLite
database or something.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training.html

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to