If they are modelling separate applications, then they each need to have a different task affinity. Having the same affinity means that when you start the activity, it will have an affinity for an existing task with the same name.
On Thu, Jun 10, 2010 at 8:09 AM, James Wang <[email protected]> wrote: > Dianne, You are right. > We did want to make an activity like launcher. > > In fact, our product is more complicated than what I said above. > > Below is the real plan: > 1)We made an activity as the launcher L; > 2)A tells L to start B; > 3)B does something and tells L starts A again. > > L,A,B have the same taskAffinity. And L starts B and A with NEW_TASK. > > BTW, I noticed such words in SDK reference: > "Similarly, a new instance of a "singleTop" activity may also be > created to handle a new intent. However, if the target task already > has an existing instance of the activity at the top of its stack, that > instance will receive the new intent (in an onNewIntent() call); a new > instance is not created. In other circumstances — for example, if an > existing instance of the "singleTop" activity is in the target task, > but not at the top of the stack, or if it's at the top of a stack, but > not in the target task — a new instance would be created and pushed on > the stack." > > It says if A is singleTop, A gets created twice is supposed to be true > because A is not on the top of task. > But we did not set A as singleTop. > > -- > 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]<android-developers%[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

