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.
On Jul 20, 3:24 pm, Mark Murphy <[email protected]> wrote: > On Wed, Jul 20, 2011 at 7:02 AM, Fina Perez <[email protected]> wrote: > > As far as I know, Android kills an application after sometime if the > > user is not interacting with it, in order to save memory. If the user > > goes back to the application, the last activity is displayed again. > > That depends on how the user "goes back to the application". If they > click on the launcher icon, they will go to the launcher activity. If > they navigated back to the destroyed activity via the BACK button or > something like that, they will go to that specified activity. > > > What I would like to do is that when this situations occurs, I always > > would like to restart from my main activity. But only if my > > application was killed, not in other scenarios. > > Why? > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training -- 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

