[android-developers] Android activity/task order issue
Hi,
I have an app with 2 main activities and a service. The app starts
with activity 1, and the service launches activity 2 via an intent
upon detection of an app launch A. Activity 2 then does some stuff and
calls finish(), returning to app A.
However, if I launch app A when I'm in activity 1, activity 2 appears
and returns to activity 1 once it's done instead of returning to app
A. If I then tap on the back button, I return to app A.
On the other hand, if I go back to the home screen when I'm on
activity 1 and start app A, activity 2 appears, and now returns to app
A once it's done. This is the behavior I'm looking for, but it only
happens when I'm not starting out from activity 1.
Why does this happen? I'm launching activity 2 via an intent in the
service with the FLAG_ACTIVITY_NEW_TASK flag.
Thanks.
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home