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. How to push file into android shell kernel

Hello everyone~

I want to push something into android shell kernel.

Hence I use adb command like this

$./adb -s emulator-5554 push hello /data

However, this command can only push into /data this directory.

But I want to push to other directories like /proc , /sys , or /
system ...etc

Is there any way can put file into android shell kernel !?

Thanks a lot.

Best Regards

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

2. calling .NET webservice using ksoap Android

Hi All,

Same question is asked previously in this forum. I am asking it again
after referring all question in this forum.

Problem :- I am trying call call .NET Web service from Android device.
I can call web service without parameter successfully; but when tried
to pass parameter it shows null in server side log.

Technology/API used : -

-> KSOAP 2.0 for Android

-> .NET Framework 3.5 + WCF Web service

-> Web service type is document literal.

Point to be noted over here is same service working fine with
normal .NET Web service.

Before I post my code here is my trying so far,

1. As suggested in this forum, I have changed server side NAMESPACE to
URI not URL. For i.e. - Previously it was http://tempurl.com and now i
have changed it to uri:myService

2. I am adding XML header in the request, even tried to by removing
it. i.e - httpTransport.setXmlVersionTag("<?xml version=\"1.0\"
encoding= \"UTF-8\"?>");

3. I have enabled the Access data sources across domains IE option in
server side/client side.

Code looks like below,

request = new SoapObject(Util.NAMESPACE, method);
request.addProperty("name", value);
soapEnvelope = new
SoapSerializationEnvelope(SoapSerializationEnvelope.VER11);
    httpTransport = new HttpTransportSE(Util.URL);
    soapEnvelope.dotNet = true;
    soapEnvelope.setOutputSoapObject(request);
    httpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=
\"UTF-8\"?>");
    httpTransport.call(SOAP_ACTION, soapEnvelope);

I have end up spending lots of time in this issue.
Help will be appreciated.

-- 

3. Key Dispatching Time Out problem

4. project help

5. bitmap size exceeds VM budget

6. How can I use different row view for selected or unselected list item?

7. Video streaming from android mobile phone to a remote computer