[android-developers] Re: How to exit the application completely from any screen
I have also got same problem I tried your clue too but it seems to close only one process id and close current page. And not the whole application. It only get backs the page and but actually application does not goes forward. On Saturday, September 13, 2008 5:28:23 PM UTC+5:45, Pau wrote: Hi, if you kill the application completely: int pid = android.os.Process.myPid(); android.os.Process.killProcess(pid); On 13 sep, 09:58, Romain Guy romain...@google.com wrote: There is no need to do this. The user can just press the Home key to exit the app. On Fri, Sep 12, 2008 at 6:27 PM, elephantbug elephant...@gmail.com wrote: Hi, Is there a way to exit the application completely at any place? call finish() will only exit the current activity. I tried to getApplication() from activity and call its onTerminate() directly... but it seems not working at all... Anyone can give any clue how to do it? Thanks -- Romain Guywww.curious-creature.org- Ocultar texto de la cita - - Mostrar texto de la cita - -- 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 exit the application..?
I have a legitimate reason for wanting to kill the JVM. There appears to be a bug when instantiating the TextToSpeech class. You can read about it here: http://stackoverflow.com/questions/4819330/texttospeech-oninitlistener-oninitint-being-called-continuously The listener is repeatedly called (thousands of times until the user Force Stops the app). I imagine the app slows the system down to a crawl (because these calls are made on the UI thread). I've tried various things like calling shutdown on the TextToSpeech class but none of it helps. The only workaround I can think of is to, when it happens, disable TTS (within the app) in future and then kill the JVM. The question is, which approach is better, System.exit() or Process.kill()? On Jan 11, 1:04 pm, Stephan Wiesner testexpe...@googlemail.com wrote: It comes back to designing Apps that do not need to be stopped. Let me guess, you do not own a Samsung Galaxy S I9000? I was constantly switching to the taskmanager trying to kill processes, uninstalling all apps that ran in the background, etc until the 2.2.1 patch. . . Android might kill a process/app sooner or later, but I don't want to lag-wait on a 600$ phone. The Galaxy is (was) ver slow when a few apps ran. And it is the phone that most of my users own. Sorry, had to let that out :-) Greetings from Lucerne, Stephan -- 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] Re: How to exit the application..?
use Runtime.getRuntime.exit(code); On Mon, Jan 31, 2011 at 12:55 PM, Mark Carter mjc1...@googlemail.comwrote: I have a legitimate reason for wanting to kill the JVM. There appears to be a bug when instantiating the TextToSpeech class. You can read about it here: http://stackoverflow.com/questions/4819330/texttospeech-oninitlistener-oninitint-being-called-continuously The listener is repeatedly called (thousands of times until the user Force Stops the app). I imagine the app slows the system down to a crawl (because these calls are made on the UI thread). I've tried various things like calling shutdown on the TextToSpeech class but none of it helps. The only workaround I can think of is to, when it happens, disable TTS (within the app) in future and then kill the JVM. The question is, which approach is better, System.exit() or Process.kill()? On Jan 11, 1:04 pm, Stephan Wiesner testexpe...@googlemail.com wrote: It comes back to designing Apps that do not need to be stopped. Let me guess, you do not own a Samsung Galaxy S I9000? I was constantly switching to the taskmanager trying to kill processes, uninstalling all apps that ran in the background, etc until the 2.2.1 patch. . . Android might kill a process/app sooner or later, but I don't want to lag-wait on a 600$ phone. The Galaxy is (was) ver slow when a few apps ran. And it is the phone that most of my users own. Sorry, had to let that out :-) Greetings from Lucerne, Stephan -- 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 -- Regards, Narendra . -- 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] Re: How to exit the application..?
Use this: This will stop the proccess: android.os.Process.killProcess(android.os.Process.myPid()); /Maali 2011/1/10 dilu discover.dile...@gmail.com Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- 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
Re: [android-developers] Re: How to exit the application..?
And then if you have a Service component, be prepared for it to stop working after a period of time. 10.01.2011 14:04, 20plus10 30 пишет: Use this: This will stop the proccess: android.os.Process.killProcess(android.os.Process.myPid()); /Maali 2011/1/10 dilu discover.dile...@gmail.com mailto:discover.dile...@gmail.com Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com mailto:hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com mailto:donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com mailto:manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com mailto:abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com mailto:victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com mailto:abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.comandroid-developers%2bunsubs-cr...@googlegroups.com mailto:android-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com mailto:android-developers%252bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com mailto:android-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com mailto:android-developers%252bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com mailto:android-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.com mailto:android-developers%25252bunsubscr...@googlegroups.comandroid-developers%252-52bunsubscr...@googlegroups.com mailto:android-developers%25252-52bunsubscr...@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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.comandroid-developers%2bunsubs-cr...@googlegroups.com mailto:android-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com mailto:android-developers%252bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com mailto:android-developers%25252bu-nsubscr...@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 mailto:android-developers@googlegroups.com
Re: [android-developers] Re: How to exit the application..?
It wil stop the application ttally. It kills its own proccess. 2011/1/10 Kostya Vasilyev kmans...@gmail.com And then if you have a Service component, be prepared for it to stop working after a period of time. 10.01.2011 14:04, 20plus10 30 пишет: Use this: This will stop the proccess: android.os.Process.killProcess(android.os.Process.myPid()); /Maali 2011/1/10 dilu discover.dile...@gmail.com Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- You
[android-developers] Re: How to exit the application..?
Thanks to everyone who all shared their idea. I used Abhilash'c link i.e. http://androidsnips.blogspot.com/2010/08/finish-application.html Its working perfectly for me. Regards Dileep On Jan 10, 4:27 pm, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. 2011/1/10 Kostya Vasilyev kmans...@gmail.com And then if you have a Service component, be prepared for it to stop working after a period of time. 10.01.2011 14:04, 20plus10 30 пишет: Use this: This will stop the proccess: android.os.Process.killProcess(android.os.Process.myPid()); /Maali 2011/1/10 dilu discover.dile...@gmail.com Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer
Re: [android-developers] Re: How to exit the application..?
On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 exit the application..?
On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Re: How to exit the application..?
On Mon, Jan 10, 2011 at 6:15 PM, jotobjects jotobje...@gmail.com wrote: In the usual case of the Application only having one Process what part of the application would not be stopped? All of the state about the app is kept -- other activities the user has visited, running services, etc. The process may quickly be restarted due to this, or later be re-started in a different state to match them. It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. Well, killing the process absolutely does not mean clean up the activity history. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? Use finish(). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 exit the application..?
@Dianne, But I think finish() kills only one activity at a time.With in a application if we want to close the application/kill the application totally from any activity then what to do? Regards Dileep On Jan 11, 8:04 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 6:15 PM, jotobjects jotobje...@gmail.com wrote: In the usual case of the Application only having one Process what part of the application would not be stopped? All of the state about the app is kept -- other activities the user has visited, running services, etc. The process may quickly be restarted due to this, or later be re-started in a different state to match them. It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. Well, killing the process absolutely does not mean clean up the activity history. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? Use finish(). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Re: How to exit the application..?
Finish is the recommended way of closing Activites. You should be using only this to exit your Activities. The OS will take care of the Application as a whole. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 7:45 AM, jotobjects jotobje...@gmail.com wrote: On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
Another way is to kill the process explicitly using Application Process Id. On Tue, Jan 11, 2011 at 10:54 AM, Kumar Bibek coomar@gmail.com wrote: Finish is the recommended way of closing Activites. You should be using only this to exit your Activities. The OS will take care of the Application as a whole. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 7:45 AM, jotobjects jotobje...@gmail.com wrote: On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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.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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
This is going to be disabled in future releases (As far as I know). Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 11:03 AM, kavitha b kkavith...@gmail.com wrote: Another way is to kill the process explicitly using Application Process Id. On Tue, Jan 11, 2011 at 10:54 AM, Kumar Bibek coomar@gmail.comwrote: Finish is the recommended way of closing Activites. You should be using only this to exit your Activities. The OS will take care of the Application as a whole. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 7:45 AM, jotobjects jotobje...@gmail.com wrote: On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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.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.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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
Ohh,is it?I was not knowing that. But this procedure I have used in my previous app. On Tue, Jan 11, 2011 at 11:06 AM, Kumar Bibek coomar@gmail.com wrote: This is going to be disabled in future releases (As far as I know). Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 11:03 AM, kavitha b kkavith...@gmail.com wrote: Another way is to kill the process explicitly using Application Process Id. On Tue, Jan 11, 2011 at 10:54 AM, Kumar Bibek coomar@gmail.comwrote: Finish is the recommended way of closing Activites. You should be using only this to exit your Activities. The OS will take care of the Application as a whole. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 7:45 AM, jotobjects jotobje...@gmail.comwrote: On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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.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.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.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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
No no no no. (a) Using Process.kill() is NOT the same as finishing an activity. At all. In any way shape or form. Don't mix the two. You want to finish your UI? Call finish(). A process is not an application. Don't take that association from other platforms, that is not how it works on Android. (b) Nobody has said anything about Process.kill() not doing anything. You want to kill your *own* process and cause the user to experience your *own* application having weird behavior at times due to it? Have at it. I just want to be clear that this is not what we recommend doing, it is not doing what you seem to think it is, and you are likely to cause bad behavior in your app at least at times due to it. (c) There is no API to quit an application, because there is no such concept on Android, and trying to implement such a thing is going to result in fighting against how Android works. On Mon, Jan 10, 2011 at 9:42 PM, kavitha b kkavith...@gmail.com wrote: Ohh,is it?I was not knowing that. But this procedure I have used in my previous app. On Tue, Jan 11, 2011 at 11:06 AM, Kumar Bibek coomar@gmail.comwrote: This is going to be disabled in future releases (As far as I know). Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 11:03 AM, kavitha b kkavith...@gmail.com wrote: Another way is to kill the process explicitly using Application Process Id. On Tue, Jan 11, 2011 at 10:54 AM, Kumar Bibek coomar@gmail.comwrote: Finish is the recommended way of closing Activites. You should be using only this to exit your Activities. The OS will take care of the Application as a whole. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Jan 11, 2011 at 7:45 AM, jotobjects jotobje...@gmail.comwrote: On Jan 10, 11:17 am, Dianne Hackborn hack...@android.com wrote: On Mon, Jan 10, 2011 at 3:27 AM, 20plus10 30 20plu...@gmail.com wrote: It wil stop the application ttally. It kills its own proccess. It does kill the process, but that does not stop the application totally. Don't use this. In the usual case of the Application only having one Process what part of the application would not be stopped? It seems that finish() is the better way so that the Android platform can manage the process lifecycle, but finish() only stops one Activity not all the components of the Application. The FLAG_ACTIVITY_CLEAR_TOP from the launch Activity will stop the Activities (if there is not more than one Task involved) but not the Service components. It comes back to designing Apps that do not need to be stopped. The real world case I encountered recently was an App that required registration and exited automatically if the user did not complete the registration steps. This was done with finish(). Is there any better way to accomplish that kind of requirement? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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.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.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.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
[android-developers] Re: How to exit the application..?
It comes back to designing Apps that do not need to be stopped. Let me guess, you do not own a Samsung Galaxy S I9000? I was constantly switching to the taskmanager trying to kill processes, uninstalling all apps that ran in the background, etc until the 2.2.1 patch. . . Android might kill a process/app sooner or later, but I don't want to lag-wait on a 600$ phone. The Galaxy is (was) ver slow when a few apps ran. And it is the phone that most of my users own. Sorry, had to let that out :-) Greetings from Lucerne, Stephan -- 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 exit the application..?
Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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%2bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%252-52bunsubscr...@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.comandroid-developers%2bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@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.comandroid-developers%2bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- 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] Re: How to exit the application..?
There is no concept of Exiting an application. You app should just call finish whenever you want to close your app. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Mon, Jan 10, 2011 at 12:12 PM, dilu discover.dile...@gmail.com wrote: Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
Re: [android-developers] Re: How to exit the application..?
Hi Dilu, check the below link definitely it'l be useful for u.. http://androidsnips.blogspot.com/2010/08/finish-application.html On Mon, Jan 10, 2011 at 12:12 PM, dilu discover.dile...@gmail.com wrote: Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- 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,
[android-developers] Re: How to exit the application..?
I know the android architecture.According to that there is no exit application option recommended... But if we have to do then how to do? I am working on a webservice based application.In case if due to some reason application is not able to connect to the service then I want to exit the application completly so tht he can restart the app again. Regards Dileep On Jan 10, 11:45 am, Kumar Bibek coomar@gmail.com wrote: There is no concept of Exiting an application. You app should just call finish whenever you want to close your app. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Mon, Jan 10, 2011 at 12:12 PM, dilu discover.dile...@gmail.com wrote: Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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%2bunsubs-cr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252b-unsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25-252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25-252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%252-52bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%-25252-52bunsubscr...@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.comandroid-developers%2bunsubs-cr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252b-unsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bu-nsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25-252bu-nsubscr...@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.comandroid-developers%2bunsubs-cr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252b-unsubs-cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework
Re: [android-developers] Re: How to exit the application..?
Calling finish, essentially exits your app. Whatever you need to initialize for your next start of your application, can be againd done in the onCreate or onResume method. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com 2011/1/10 dilu discover.dile...@gmail.com I know the android architecture.According to that there is no exit application option recommended... But if we have to do then how to do? I am working on a webservice based application.In case if due to some reason application is not able to connect to the service then I want to exit the application completly so tht he can restart the app again. Regards Dileep On Jan 10, 11:45 am, Kumar Bibek coomar@gmail.com wrote: There is no concept of Exiting an application. You app should just call finish whenever you want to close your app. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Mon, Jan 10, 2011 at 12:12 PM, dilu discover.dile...@gmail.com wrote: Even I tried with System.exit(0). But its not working .So question is that how to completly exit the application if we want to do . On Dec 29 2010, 11:10 am, Dianne Hackborn hack...@android.com wrote: No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%2bunsubs-cr...@googlegroups.comandroid-developers%252bunsubs-cr...@googlegroups.com android-developers%252b-unsubs-cr...@googlegroups.comandroid-developers%25252b-unsubs-cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%25-252bu-nsubscr...@googlegroups.comandroid-developers%2525-252bu-nsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%252bu-nsubscr...@googlegroups.comandroid-developers%25252bu-nsubscr...@googlegroups.com android-developers%25-252bu-nsubscr...@googlegroups.comandroid-developers%2525-252bu-nsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@googlegroups.com android-developers%252-52bunsubscr...@googlegroups.comandroid-developers%25252-52bunsubscr...@googlegroups.com android-developers%-25252-52bunsubscr...@googlegroups.comandroid-developers%25-25252-52bunsubscr...@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] Re: How to exit the application..?
On Monday, January 10, 2011 12:52:25 PM UTC+6, dilu wrote: ... if due to some reason application is not able to connect to the service then I want to exit the application completly so tht he can restart the app again. If you think that the some reason of not being able to connect to server would be solved if the user restarts your application, then the problem is actually inside your application code. Please rethink. List the probable reasons of not being able to connect (and double check if those can be really solved by exiting and restarting your app). If this is the case, then do exactly the things that your application would do during exit and restart --- this will solve your problem. Regards Sarwar Erfan -- 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 exit the application..?
System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
But system.exit(0); is not working..? 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
No, it doesn't, it exits the process, but leaves whatever activity stack is being maintained by the system. 2010/12/28 Sandeep N M donks...@gmail.com System.exit(0); Gets you out of anywhere to home screen :). Regards Sandeep On Dec 27, 4:43 pm, Manoj Maurya manojk.mau...@gmail.com wrote: you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 exit the application..?
You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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] Re: How to exit the application..?
Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to exit the application..?
you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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 at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to exit the application completely from any screen
There is no need to do this. The user can just press the Home key to exit the app. On Fri, Sep 12, 2008 at 6:27 PM, elephantbug [EMAIL PROTECTED] wrote: Hi, Is there a way to exit the application completely at any place? call finish() will only exit the current activity. I tried to getApplication() from activity and call its onTerminate() directly... but it seems not working at all... Anyone can give any clue how to do it? Thanks -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to exit the application completely from any screen
otherwise, just grab a flag in onActivityResult(...) of the parent-activity and call .finish() also. Works really smooth with me. Regards, plusminus http://anddev.org # Worlds largest Android Development Community / Tutorials On Sep 13, 3:58 am, Romain Guy [EMAIL PROTECTED] wrote: There is no need to do this. The user can just press the Home key to exit the app. On Fri, Sep 12, 2008 at 6:27 PM, elephantbug [EMAIL PROTECTED] wrote: Hi, Is there a way to exit the application completely at any place? call finish() will only exit the current activity. I tried to getApplication() from activity and call its onTerminate() directly... but it seems not working at all... Anyone can give any clue how to do it? Thanks -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to exit the application completely from any screen
Hi, if you kill the application completely: int pid = android.os.Process.myPid(); android.os.Process.killProcess(pid); On 13 sep, 09:58, Romain Guy [EMAIL PROTECTED] wrote: There is no need to do this. The user can just press the Home key to exit the app. On Fri, Sep 12, 2008 at 6:27 PM, elephantbug [EMAIL PROTECTED] wrote: Hi, Is there a way to exit the application completely at any place? call finish() will only exit the current activity. I tried to getApplication() from activity and call its onTerminate() directly... but it seems not working at all... Anyone can give any clue how to do it? Thanks -- Romain Guywww.curious-creature.org- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to exit the application completely from any screen
but our app wants to prevent user from continuing use the app. Maybe freeze the app can also do the trick, which forces user to use home dutton. There should be a way to auto exit , just do not know how. Anyone? On Sep 13, 12:58 am, Romain Guy [EMAIL PROTECTED] wrote: There is no need to do this. The user can just press the Home key to exit the app. On Fri, Sep 12, 2008 at 6:27 PM, elephantbug [EMAIL PROTECTED] wrote: Hi, Is there a way to exit the application completely at any place? call finish() will only exit the current activity. I tried to getApplication() from activity and call its onTerminate() directly... but it seems not working at all... Anyone can give any clue how to do it? Thanks -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---