Android Task Stack running rules and android task rules
I. Foreground stack indicates application A, and background stack is application B's foreground stack/taskAffinity/launchMode background stack/taskAffinity/launchModeActivityB/com. lpn. testone/singleTask ActivityD/com. lpn. modeopj/standardActivityA/com. lpn. testone/singleTask ActivityC/com. lpn. modeopj/standard starts C of the background Stack from B of the foreground stack. The result is that the D stack of the background stack is started directly: search for/taskAffinity/launchMode foreground stack/taskAffinity/launchModeActivityB/com in the background. lpn. testone/singleTask ActivityD/com. lpn. modeopj/standardActivityA/com. lpn. testone/singleTask ActivityC/com. lpn. in this case, modeopj/standard starts interface a on interface d. As A result, stack B is destroyed: The frontend looks for/taskAffinity/launchMode background stack/taskAffinity/launchModeActivityA/com. lpn. testone/singleTask ActivityD/com. lpn. modeopj/standard ActivityC/com. lpn. modeopj/standard 2: The stack jump/taskAffinity/launchMode // taskAffinity value can be used with singleTask mode in the same application, but it is invalid with standard/singleTop, singleInstance does not require ActivityA/com. neng. dong/singleTaskA starts an ActivityB/android. task. browser/standard Stack: ActivityB/android. task. browser/standardActivityA/com. neng. dong/singleTask B starts an ActivityC/android. taskkk. browser/singleTask Stack: Stack 1, stack 2, ActivityB/android. task. browser/standard ActivityC/android. taskkk. browser/singleTask ActivityA/com. neng. dong/singleTaskC starts an ActivityD/com. neng. dong/singleInstance Stack: Stack 1 stack 2 stack 3 ActivityB/android. task. browser/standard ActivityC/android. taskkk. browser/singleTask ActivityD/com. neng. dong/singleInstance ActivityA/com. neng. dong/singleTask