How can I terminate an app in the Android Emulator so that Activity's onDestroy is called? Stopping the process from the Devices window seems to be a process kill, not a graceful closing like the OS does.
Asked
Active
Viewed 1,368 times
1 Answers
1
Just pressing the back button in the emulator should finish the activity and call onDestroy. That I suppose is the default behavior if you have not overridden it through onBackPressed.

Abhinav
- 38,516
- 9
- 41
- 49
-
Does not terminate the process, but kills the activity. Good for my purposes. – Seva Alekseyev Apr 16 '11 at 21:30
-
Yep. Android takes care of terminating the process. Huge discussion here: http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon/2034238#2034238 – Abhinav Apr 16 '11 at 21:32