On Mon, Mar 8, 2010 at 1:42 PM, TreKing <[email protected]> wrote:
> On Mon, Mar 8, 2010 at 12:47 AM, Farproc <[email protected]> wrote:
>>
>> try {
>>        System.exit(0);
>> } catch (SecurityException e) {
>
> This is NOT recommended. Use finish() on your activities and let Android
> deal your app when it's ready.
>

TreKing is right, please don't use System.exit - use Activity.finish().

If you have multiple activities to close, use startActivityForResult()
and pass back a "close now" flag so you know to call finish() on the
parent activity as well.

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

Reply via email to