> 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.
This is not true for my devices. At least not after manually
destroying an app using a task manager. I get the same behavior from
launcher icon and back button. On HTC Hero with Android 2.1, I always
end up in the launcher activity. On Nexus S with Android 2.3.4 and
Motorola Xoom with Android 3.0.1, I always end up in the last activity
that was displayed.

On 20 Juli, 15:24, Mark Murphy <mmur...@commonsware.com> wrote:
> On Wed, Jul 20, 2011 at 7:02 AM, Fina Perez <fina.pere...@gmail.com> 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 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