System.exit(0) is not recommended because it messes up when a user
brings the app back after a short pause.
Horrible things can happen to what you've got in memory. Its not a
clean or consistent memory wipe IMO.
I think you have to work with the idea that activities are held in
memory for a time
Hello,
I had same issue, found a solution and post it in the blog:
http://softteco.blogspot.com/2011/07/how-to-close-activity-and-all-children.html
Do not forget to say thanks in comments if this info is useful! :)
Happy coding (:
Best regards,
Yahor
On Wed, Aug 24, 2011 at 11:01 AM, Droid
Very simple. If you are sure you are done, You could just kill
yourself using
android.os.process.killProcess(android.os.Process.myPid()); It's the
same as linux shell command kill.
On Aug 24, 3:19 pm, GopalaKrishnan D gopall...@gmail.com wrote:
i tried finish(); and System.exit(0);
if i use
Its not always so simple to use
android.os.process.killProcess(android.os.Process.myPid()); to close
your app.
1) You cannot detect when the home button has been pressed so when to
call killProcess? If you are lucky calling it in onStop() somehow may
work but that can get very difficult if you
What method do you use to exit your app?
On Jun 3, 10:41 am, nageswara rao rajana nagu.raj...@gmail.com
wrote:
Hi,
I developed android application which consists 3 Activities, when i
am in 3rd activity and clicked exit in menu options.
The application closed, but again when i
Hi,
This is the sample code i used in exit function.
Intent e=new Intent(Intent.ACTION_MAIN);
e.addCategory(Intent.CATEGORY_HOME);
e.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
this.finish();
startActivity(e);
with regards,
6 matches
Mail list logo