How to close all activities on android app

by Bruno Lopes » Thu, 19 May 2011 12:45:48 GMT

Sponsored Links
 Hi for all

I'he a android app with 5 activities and i would close all open
activities by pressing a button, for example. How I do it exactly?
What is the better strategy? Somebody can help me?


Re: How to close all activities on android app

by TreKing » Thu, 19 May 2011 23:04:51 GMT


IDK about "best", but discussed here has been the idea of a flag you pass
down the stack in onActivityResult() that tells each parent Activity in the
chain that it should commit suicide and pass the message along.

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Sponsored Links

Re: How to close all activities on android app

by Bruno Lopes » Fri, 20 May 2011 10:02:36 GMT



Re: How to close all activities on android app

by Simon Jackson » Fri, 20 May 2011 13:41:03 GMT

 make a parent Activity class to derive all your app classes from, and have a 
static Activity head, and a private Activity linkField. Then a static void 
closeListOfActivity() method

This also allows next activity in class jump functionality. Well it would if 
the instance would stay unkilled.

Have the master activity store its bundle in a static, and implement some 
sub bundle tree. I think .class means when the last instance is killed, the 
class has to be removed otherwise static class variables would hold 
references to possibly killed objects. Maybe ??

A static and helper threads checking for keep alive?

Is there a short definitive solution to the arrayofActivity? or a definitive 
answer on static class variable references to Activity instances?

Cheers Jacko


Re: Re: How to close all activities on android app

by Rocky » Fri, 20 May 2011 15:11:35 GMT

 use function movetasktoback().

Thanks & Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
(O) +918030274295
(R) +919886336619


Other Threads

1. Problems alloweing self-signed certificates.


I am developing some application which send and HTTP form, using HTTP
POST method.
I must use HTTPS, so the resource at server is under HTTPS (https://, for develop I am using a self-signed
certificate for server.

Here you have the method which try to send this form by HTTPS:
There I create a DefaultHttpClient using a custom which try to use

But everything seems to be ok, until I run this code and get an
exception: Not trusted server certificate.

How can I solve this?

If you need more info, please feel free to ask me.

Thank you very much.


2. cara ngilangin (hide) di galery

misi rekan2, ada yg tau cara hide file2 gambar yg ada di galery ga?
jadi gua pgn tuh di galery cuma utk wallpapper sama foto2 aja.

c/o : ada game yg nyimpen banyak gambar, nah kl buka galery penuh tuh
sama pic2 nya dia. ada cara hide nya ga yah?

saya pake moto droid 2.


3. Rooted, whats next? WAS: pilih z4root or SuperOneClick utk Galaxy tab?

4. Very OOT. Apakah HP Android juga spt ini? Palomitas_al_movil.wmv

5. How to provide Complex rendering support in android

6. Droid 2 Global

7. ndk-gdb on cygwin/windowsXP won't load symbol tables.