me (and others) give you the best answer.
The issue is that the answer is not as simple as you might expect.
You can close an Activity with finish() and finishActivity(),
finishActivityFromChild(), and finishFromChild(). These are documented
in the reference section of the Developer Guide. However, the Android
architecture assumes that there's no need to terminate an application
or its process. You don't need to worry about returning memory to the
system. Android will do that for you if the app is idle and the memory
is needed. An idle process doesn't consume CPU time. If there's
another reason that you want the process completely killed, you can
post it here so that others can suggest options. It may be that you
want to give back a resource such as connectivity, and for that you
don't need a full "kill".
In short, there may be an Android way of doing what you want to do
without using finish(). To answer the question without knowing the
context would do you a disservice, by steering you in the wrong
direction.
On Aug 4, 9:43 am, ls02 <agal...@audible.com> wrote:
> I need to implement option to quit the app. I tried calling
> System.exit(0) but Android restarts the app process immediately.
--
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