I think this will just work fine:

android.os.Process.killProcess(android.os.Process.myPid());

As far as I know, it kills the current DalvikVM right on the spot, so
be careful.

On 10 Aug., 20:49, jhoffman <[email protected]> wrote:
> It really depends on the structure of your app, but one trick you
> might employ is to launch your various activities with
> startActivityForResult(intent, ID);
> and then override onActivityResult to watch for a return value from
> the activity you launched. You can then make decisions about whether
> you should call finish() in the original activity, or whether the user
> just wanted to go back to that original activity without closing the
> entire app.
>
> Again, without knowing the structure of your app or more details, I
> can't be sure that this is actually going to be helpful to you. If it
> isn't though, feel free to post some specifics! :)
>
> On Aug 10, 2:36 am, Blackmarket <[email protected]> wrote:
>
> > Hi,
>
> > i want to add anexitbutton to the menu, but didn't see an easy way
> > to close anapplicationor acces all activities of anapplicationand
> > finish them. Is there an easy approach avaible?
>
> > Regards, Pascal
>
>
--~--~---------~--~----~------------~-------~--~----~
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