Re: [android-developers] Exit function in android application

2011-07-01 Thread Mark Murphy
On Fri, Jul 1, 2011 at 12:14 AM, nageswara rao rajana
nagu.raj...@gmail.com wrote:
      In application i have 4 activities, and also exit in my menu option if
 i click exit in any activity it is destroying the current activity
      and displaying the previous activity. But my requirement is if  i click
 exit in activity the application should be killed and should
      display the home.

Your requirement is flawed:

http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon/2034238#2034238

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.5 Available!

-- 
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] Exit function in android application

2011-06-30 Thread nageswara rao rajana
Hi,

 In application i have 4 activities, and also exit in my menu option if
i click exit in any activity it is destroying the current activity
 and displaying the previous activity. But my requirement is if  i click
exit in activity the application should be killed and should
 display the home. Please help me its urgent.

  Thanking you,
  Nagu.

-- 
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

Re: [android-developers] Exit function in android application

2011-06-30 Thread νιנαソkum
**try this one

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

On Fri, Jul 1, 2011 at 9:44 AM, nageswara rao rajana
nagu.raj...@gmail.comwrote:

 Hi,

  In application i have 4 activities, and also exit in my menu option if
 i click exit in any activity it is destroying the current activity
  and displaying the previous activity. But my requirement is if  i
 click exit in activity the application should be killed and should
  display the home. Please help me its urgent.

   Thanking you,
   Nagu.

 --
 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




-- 




Nobody can go back and start a new beginning, but anyone can start today
and make a new ending
-
Thanks,
Regards,
νιנαソαkum@r M
BloG:http://iamvijayakumar.blogspot.com/
Mob.No:09048382536(Kerala)
Mob.No:09751076707(TN)

-- 
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

Re: [android-developers] Exit function in android application

2011-06-30 Thread nageswara rao rajana
Hi vijay,

 If i use this code will all activities will destroy in my application
or they will run inbackground.

Intent intent = new Intent(Intent.ACTION_MAIN);
 intent.addCategory(Intent.CATEGORY_HOME);
 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 startActivity(intent);

 Thanking you,

Nagu.

-- 
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