2

I wanted to resolve some multi-activity issues in android and someone pointed to me a command to analyze the currently active activities using :

adb shell dumpsys activity activities

From what I understand, Nougat has 2 stacks : Stack #0 and Stack #1. Stack 0 is a launcher stack and Stack 1 is a more generic stack. This was done to facilitate multitasking. Can someone elaborate more on the difference and use-cases of these stacks?
I have a situation as follows : An activity Activity A (in app A) is present is the Stack #0. This launches an Activity B (in app B)(using FLAG_ACTIVITY_NEW_TASK) which is launched in Stack #1. Now I am sending an intent for Activity A and I expect this intent to just resume the instance already present in Stack #0 but this is not the case. This intent causes a new instance of Activity A to be created in Stack #1.

How can I obtain my desired behavior ?

iammrmehul
  • 730
  • 1
  • 14
  • 35

0 Answers0