Then you have a bug that needs to be fixed. Putting band-aids over broken code is likely to make it only worse in the long run.

Try initializing your data on-demand, so it's available to any activity that may need it.

FWIW, there a manifest flag that resets the stack to the main activity, but it does this every time, crash or not.

And "killed because of .... an error" sounds like more bugs that need to be fixed.

-- Kostya

20.07.2011 17:56, Fina Perez пишет:
Well, the problem is that when the program is killed, due to android
policies or because of an error, sometimes the program is restarted in
the last activity that was displayed. In my application, when this
happens, I have an error and the program is "force to close" because
I'm missing some data that I dont have if the program is restarted in
that activity. So I would like, in that case, to force the program to
restart in my main activity. I'm using MVPC (Model view presenter
controller), so if Android restarts in the last activity, some data
dont exists, that's why I would like to restarts in the main activity.

--
Kostya Vasilyev

--
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