Android: How to stop and exit your application

Normally the "back" button will exit your application, but if you wanted to put that functionality into an "exit" button, then you'll need to call YourActivity.finish().

*update 21/02/2011*
Just keep in mind that this will mark an activity as "ready to be cleaned up" by the OS.
It will not immediately clean it up, so don't worry when you see the activity reside in the emulator for a bit longer.
 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog