hi, can anybody help with the query.
Basically the query is, if I make allowTaskReparenting to true, will there be a single instance of the activity that gets re-parented from one task to another ? >From developer.android.com, i gather, ======================== If an activity has its allowTaskReparenting attribute set to "true", it can move from the task it starts in to the task it has an affinity for when that task comes to the fore. For example, suppose that an activity that reports weather conditions in selected cities is defined as part of a travel application. It has the same affinity as other activities in the same application (the default affinity) and it allows reparenting. One of your activities starts the weather reporter, so it initially belongs to the same task as your activity. However, when the travel application next comes forward, the weather reporter will be reassigned to and displayed with that task. ======================== So if my activity starts Weather reporter activity and after some time the travel application comes to the fore the weather reporter will get re-parented to travel application. So, there should be only one activity created. But what if my activity comes to the front and calls for weather reporter ? will the weather reported that had got reparented to travel application, get reparented back to my task ? Thanks Amitkeerti Regards, Amit On Oct 4, 5:16 pm, Amitkeerti <[email protected]> wrote: > hi, > > Before asking my doubt, let me clarify my understanding of > allowTaskReparenting... > > Suppose there exists a Task (say Task 1) and this task has an activity > (say Activity 1) which wants to call my Activity (say Activity 2). Let > my activity (activity 2) set the attribute allowTaskReparenting to > true and let my activity have a specific taskAffinity(affinity1). When > Activity1 calls my activity (activity2), my activity becomes part of > the task1. But suppose another task (task2) is already present/created > with the same taskAffinity as mine (affinity1) and an activity in that > task (say activity3) tries to start my activity, my activity gets re- > parented to task2. > > Not sure if i was clear enough. If i were to rephrase my words... > > If my activity has allowTaskReparenting set to true and an instance of > my activity is already present in task1. If task2 with the same task > affinity as my activity tries to start my activity, the EXISTING > activity gets re-parented from task1 to task2. > > My quesions: > (1) Is my understanding correct ? > (2) If I am correct then a single instance of my activity gets shifted > from task1 to task2. So 2 activity objects of my activity are NOT > created. Am i correct ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

