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 < http://sites.google.com/site/rezmobileapps/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


 thanks






-- 



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
Bangalore
(O) +918030274295
(R) +919886336619

-- 



Other Threads

1. Help with error creating img for Asus eee 701

I'm trying to port android to my asus eee701 following this
instructions posted in:

http://docs.google.com/View?docid=ajdmx8kfg357_81cmpr56f6

when I try to build the img with the following command
"TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -
j8 installer_img" from within ~/android-eee, I get the following:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=eee_701
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
build/core/config.mk:138: *** No TARGET_CPU_ABI defined by board
config: .  Stop.

Any Idea or sugestion?

Thanks

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Running Android apps on PC

Hi,

 Is there any way to run the android applications on a pc without
using a simulator. i.e a android application running directly on a pc.?

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Bluetooth on/off in Android 1.5+

4. MediaStore.ACTION_VIDEO_CAPTURE

5. Stream videos from Youtube

6. WTGive Testi: Victor Tan

7. Bluetooth: programmatically clearing the devices names cache? And unbinding a device? And why does a device become paired after a failed connection attempt?