I agree - the App is really a collection of activities linked together with 
Intents. You can kill your own activity as suggested using finish() but 
that won't affect any other activities iin your App that are still running.

If you were desperate to do this for some reason then it may be possible to 
achieve it by making each activity a broadcast receiver and have one of 
them broadcast an intent for the others to stop, each could then finish(). 
I've not tried this so they might each need to re-broadcast the intent 
before finishing.

It might be interesting to know why you want to do this?

In one of my apps that uses finish() I use it because the activity has come 
to an end and I don't want it to appear if the user presses the Back button 
or returns to the App - I want the main activity to appear so I launch an 
intent for the main activity and then do finish() in the current activity. 
I see no need to also finish() the main activity - the user can either 
switch away or use Back to leave the main activity as desired - of course 
they may use it to trigger one of its other lower level activities all over 
again if needs be.

On Tuesday, 3 July 2012 14:15:01 UTC+1, amit wrote:
>
> No there is no such method, even if you try System.exit().. the App might 
> be still active in background.. That is the normal behavior for the Android 
> Apps
>
> On Wednesday, June 27, 2012 5:37:02 PM UTC+5:30, SIVAKUMAR.J wrote:
>>
>> Is there is any way to exit completely from application.?
>>
>> For example i developed one application.It contains 1 activity.It 
>> contains the form having a button.When user click the button it exit from 
>> app (calling finish() method of activity).
>> When i run the app in my phone.After i click the button .It will come out 
>> of application.
>> But when i click menu->settings->manage application->then i click my 
>> application.It  shows my app is running.It shows 2 buttons enabled "force 
>> close" ,"uninstall".
>> my assumtion is finish() only close the activity.
>> Is there is any method to completely come out/exit from application?
>>
>

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

Reply via email to