What generally happen when a process crashes is that it is killed, the
crashing activity removed, and then the system restarts the next thing on
the activity stack.  If you had an activity before that one on the stack
then that activity will be restarted.

This does allow you to write a pathological case where you have one
activity, that starts another, and the second activity crashing during
initialization.  That activity will be removed, the processed killed, and
then the process restarted to display the previous activity which again
launches the crashing activity.

A future version of the platform will probably just remove all activities
owned by the app when it crashes.  This is a little excessive and I would
like to be a little better about it, but yes this case is annoying.  (For
example if a browser has multiple activities for each tab/window, it would
be unfortunately to lose all of them if you get a crash while using one of
them.)

On Sat, Feb 13, 2010 at 9:28 AM, Steeler <cowboyd...@yahoo.com> wrote:

> I've noticed that whenever I introduce some new awful bug to my app
> and it crashes, Android just keeps starting it up over and over again.
> I eventually have to hit the dial button on the phone just to make my
> app lose focus.
>
> I searched this group's posts and the developer documents... I can't
> find anything about this. Is this usual behavior? If so, is there some
> way to disable it? Maybe it's just my coming from a desktop
> background, but I kind of think that when something is closed, it
> should stay closed, especially if the reason it was closed was that it
> crashed. And of course, I hope my final app never force closes, but
> with all the different hardware you never know...
>
> --
> 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<android-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

Reply via email to