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. Howto change the language settings in Android source on Mini2440

Dear all,
        I got the android source/image from
and ported it on Mini2440 board. Its booted properly. But the issue is
the language. By default, it has the chinees langauge. I want to
change it into english in the kernel itself. Help me, how to change
the Android language setting in the source before we create the
android kernel image?.

Prakash a s


2. sending scancode values from linuxapplication

Hi all,

Iam writing an sendkey events application to display characters on screen,
which takes scancodes as arguments  by opening fd=/dev/input/event0 device
and writes scan code to respective fd.

Iam calling "EVIOCGVERSION" ioctl for registration. But Iam unsuccessful in
seeing it on screen.

what updates that i need to make in Android space (or) in .kl's to make an
update to android space (or) what ioctls i need to call to make it

Thanks in advance,


3. drawable guidelines?

4. Application Security

5. why I can't see google's nexus one from eclipse

6. Issue with Android 2.0 Account API / getAuthTokenLabel() results in Resources$NotFoundException: String resource ID #0x0

7. Tweet from HTC (htc)