Re: [android-developers] Re: How to close all activities on android app

2011-05-20 Thread Rocky
use function movetasktoback().


On Fri, May 20, 2011 at 7:32 AM, Bruno Lopes brunolope...@gmail.com wrote:

 thanks

 On 19 maio, 12:04, TreKing treking...@gmail.com wrote:
  On Wed, May 18, 2011 at 8:28 PM, Bruno Lopes brunolope...@gmail.com
 wrote:
   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?
 
  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

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thanks  Regards

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to close all activities on android app

2011-05-20 Thread crios
or a non-android way to do it is calling this:

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

On May 20, 10:11 am, Rocky rkjhaw1...@gmail.com wrote:
 use function movetasktoback().









 On Fri, May 20, 2011 at 7:32 AM, Bruno Lopes brunolope...@gmail.com wrote:
  thanks

  On 19 maio, 12:04, TreKing treking...@gmail.com wrote:
   On Wed, May 18, 2011 at 8:28 PM, Bruno Lopes brunolope...@gmail.com
  wrote:
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?

   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

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Thanks  Regards

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities on android app

2011-05-20 Thread Streets Of Boston
Killing a process (in this way) may have undesired side-effects (e.g. 
Android trying to start your app's process again, etc.).

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to close all activities on android app

2011-05-19 Thread Bruno Lopes
thanks

On 19 maio, 12:04, TreKing treking...@gmail.com wrote:
 On Wed, May 18, 2011 at 8:28 PM, Bruno Lopes brunolope...@gmail.com wrote:
  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?

 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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities on android app

2011-05-19 Thread Simon Jackson
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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to close all activities in a app

2010-05-05 Thread SREEHARI

Hi,

  U can solve that problem by giving finish() inside onStop() of
Activity A. I tried this and it works.

Regards,
SREEHARI

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities in a app

2010-05-03 Thread CMF
however it just close activity B:(

On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:
 well there is a function called activity obj.finish()

 this wud suffice ur needs i guess.

 hope this helps.

 Regards,
 Saurav Mukherjee.

 On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
  I have two activities,A ,B
  A will start activity B
  When I press backbutton in B, I want to close A also
  But how can I close A here?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities in a app

2010-05-03 Thread jamesc
Use Activity.setResult() with your own defined result value, then call
Activity.finish().

So, B will call setResult() then finish().  A will now be at the top
of the task, and the finish() called by B will result in a call to A's
onActivityResult() (that is providing that B was started with
startActivityForResult()) which can check for your user defined result
value and then call finish() itself.

On May 3, 8:42 am, CMF manf...@gmail.com wrote:
 however it just close activity B:(

 On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:



  well there is a function called activity obj.finish()

  this wud suffice ur needs i guess.

  hope this helps.

  Regards,
  Saurav Mukherjee.

  On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
   I have two activities,A ,B
   A will start activity B
   When I press backbutton in B, I want to close A also
   But how can I close A here?

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities in a app

2010-05-03 Thread CMF
I did try startActivityForResult
however, i get trouble with this because my
Activity B is a translucent OpenGL activity, with activity A as a
background
when I use startActivityForResult, the translucent effect cannot be
used, it becomes black in color:(

On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:
 Use Activity.setResult() with your own defined result value, then call
 Activity.finish().

 So, B will call setResult() then finish().  A will now be at the top
 of the task, and the finish() called by B will result in a call to A's
 onActivityResult() (that is providing that B was started with
 startActivityForResult()) which can check for your user defined result
 value and then call finish() itself.

 On May 3, 8:42 am, CMF manf...@gmail.com wrote:



  however it just close activity B:(

  On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

   well there is a function called activity obj.finish()

   this wud suffice ur needs i guess.

   hope this helps.

   Regards,
   Saurav Mukherjee.

   On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
I have two activities,A ,B
A will start activity B
When I press backbutton in B, I want to close A also
But how can I close A here?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities in a app

2010-05-03 Thread jamesc
Well, that's a different problem :-)

Have you searched on this forum to see if anyone else has had the same
issue (re: transparency)?  I tried and do get a lot of hits for
'transparent+black'.  Alternatively, if you don't find any solutions,
just post another question relating to the new issue.

Cheers

James

On May 3, 9:27 am, CMF manf...@gmail.com wrote:
 I did try startActivityForResult
 however, i get trouble with this because my
 Activity B is a translucent OpenGL activity, with activity A as a
 background
 when I use startActivityForResult, the translucent effect cannot be
 used, it becomes black in color:(

 On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:



  Use Activity.setResult() with your own defined result value, then call
  Activity.finish().

  So, B will call setResult() then finish().  A will now be at the top
  of the task, and the finish() called by B will result in a call to A's
  onActivityResult() (that is providing that B was started with
  startActivityForResult()) which can check for your user defined result
  value and then call finish() itself.

  On May 3, 8:42 am, CMF manf...@gmail.com wrote:

   however it just close activity B:(

   On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

well there is a function called activity obj.finish()

this wud suffice ur needs i guess.

hope this helps.

Regards,
Saurav Mukherjee.

On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
 I have two activities,A ,B
 A will start activity B
 When I press backbutton in B, I want to close A also
 But how can I close A here?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group 
athttp://groups.google.com/group/android-developers?hl=en

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to close all activities in a app

2010-05-03 Thread CMF
Thanks Jamesc, I will post another question:) Thanks!

On May 3, 4:37 pm, jamesc jame...@gmail.com wrote:
 Well, that's a different problem :-)

 Have you searched on this forum to see if anyone else has had the same
 issue (re: transparency)?  I tried and do get a lot of hits for
 'transparent+black'.  Alternatively, if you don't find any solutions,
 just post another question relating to the new issue.

 Cheers

 James

 On May 3, 9:27 am, CMF manf...@gmail.com wrote:



  I did try startActivityForResult
  however, i get trouble with this because my
  Activity B is a translucent OpenGL activity, with activity A as a
  background
  when I use startActivityForResult, the translucent effect cannot be
  used, it becomes black in color:(

  On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:

   Use Activity.setResult() with your own defined result value, then call
   Activity.finish().

   So, B will call setResult() then finish().  A will now be at the top
   of the task, and the finish() called by B will result in a call to A's
   onActivityResult() (that is providing that B was started with
   startActivityForResult()) which can check for your user defined result
   value and then call finish() itself.

   On May 3, 8:42 am, CMF manf...@gmail.com wrote:

however it just close activity B:(

On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

 well there is a function called activity obj.finish()

 this wud suffice ur needs i guess.

 hope this helps.

 Regards,
 Saurav Mukherjee.

 On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
  I have two activities,A ,B
  A will start activity B
  When I press backbutton in B, I want to close A also
  But how can I close A here?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group 
athttp://groups.google.com/group/android-developers?hl=en

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group 
   athttp://groups.google.com/group/android-developers?hl=en

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en