Thursday, January 3, 2013

[android-developers] Re: terminating android application

First of all: Why?

Secondly: If your process is killed (through a 'kill' command issued, through System.exit or Process.killProcess), the OS may restart it (like you see sometimes when your app crashes and is starting up immediately again with the previous Activity). Also, and this depends on your app''s design and purpose, your activity may be hosted inside some other app's process. You won't be killing 'your' process but someone else's instead. 

All in all, don't kill your app. Don't have an exit button.... unless you have no other option.
http://www.youtube.com/watch?v=631T7B8HOv4


On Wednesday, January 2, 2013 10:21:45 AM UTC-5, laxman k wrote:
how terminate android application from  any activity and kill background process

i am use
finsh();
system.exit(0);
System.runFinalizersOnExit(true);
android.os.Process.killProcess(android.os.Process.myPid());

these are only close te  current Activity....

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment