There must be something more than what you are describing, because that
pattern is fundamental to how switching between tasks works and is *always*
used when launching from home.  If it didn't work, then you would see the
same problem for example when re-launching ApiDemos from home, but you can
confirm yourself that the case there works correctly.

On Mon, May 16, 2011 at 8:48 PM, Eric <[email protected]> wrote:

>
>
> On May 16, 11:33 pm, Dianne Hackborn <[email protected]> wrote:
> > As I said in another thread, if you want to switch apps you need to use
> the
> > exact same Intent that you used originally to start the task.  If you
> don't,
> > then you are launching a new activity instance for that new Intent.
> >
> > If you want to match what a home screen launches, then you need
> ACTION_MAIN,
> > CATEGORY_LAUNCHER.
>
> Thank you Dianne, that helps a bit, but here is what I am seeing
> happen:
>
> - launch app via LAUNCHER icon, bringing to you activity "A".  Task
> stack == A
>
> - navigate to another activity (call it "B") in same task.  Task stack
> == A-->B
>
> - hit HOME button
>
> - launch app again via LAUNCHER icon.  Task stack is now == A-->B-->A
> (see next item)
>
> - the app is not resuming to activity "B", even thought the LAUNCHER
> re-launched the app with the same Intent as the first time.  the app
> is resuming back at "A".  The activity stack looks like this at that
> point:   A-->B-->A, which is very counterintuitive to me, since the
> Task documentation seems to infer you should resume the app where it
> left off.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

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