Mapara,Harshit Nitinkumar wrote: > while app is running and user presses "home" button, what happens ? is > application killed ? all activities are destroyed?
None of the above. The application is still running. http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html#tour > I wrote a code in one activity's onDestroy() method. In normal > situation it gets executed while leaving that activity, but when I > press "home" button, it didn't. Correct. > And after pressing home button, the app is starting from beginning. So > it will not work what I wanted (saving a data (list of objects) ) > before app exits. Save your data in onPause() or onStop(). Both of those will be called when: -- the user presses Home -- a call comes in and the user takes the call -- the user responds to a Notification -- etc. -- 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 Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---