Suppose I have a task in which I have A, B & C
Activities
respectively. And then I'm starting a new Activity D which has singleInstance as it's launchMode.
Now, I wonder what happens in the task level? Will the same task be preserved but contains only Activity D
or new task is created?
A new task will be created with the single Activity D
. From the documentation:
Same as "singleTask", except that the system doesn't launch any other activities into the task holding the instance. The activity is always the single and only member of its task.
So you'll get
Task 1: A,B,C
Task 2: D
The following two sequence are correct which confirms the docs: