Set a flag in the current activity when it exits (for example, in onPause or onStop) when you want to "exit the app". Then, in your other activities, check for the flag in onResume. Be sure to "reset" the flag in onCreate in launch activities - otherwise, you're permanently exiting. Also, the activities might still reside in memory, as Mark points out. Configuration changes are a pain (for example, the app is "exiting" but the user rotates the phone... the activity is destroyed and re-created, wiping the flag out... or worse, not resetting it properly).
This is hazardous, so be cautious; lots of user scenarios, even for simple apps, with unintended consequences... Mark's suggestion is better for almost all apps - wait for the user to hit "back." -Jim On Aug 11, 7:49 am, Mark Murphy <[email protected]> wrote: > On Wed, Aug 10, 2011 at 10:55 PM, ndiiie 90 <[email protected]> wrote: > > how to close entire app? > > You don't, any more than you "close entire" Web app. Android will > terminate your process eventually, just leave it alone. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- 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

