The "singleTask" and "singleInstance" modes also differ from each other in only one respect: A "singleTask" activity allows other activities to be part of its task. It's always at the root of its task, but other activities (necessarily "standard" and "singleTop" activities) can be launched into that task. A "singleInstance" activity, on the other hand, permits no other activities to be part of its task. It's the only activity in the task.
以下引用自http://developer.android.com/guide/topics/manifest/activity-element.html
The "singleTask" and "singleInstance" modes also differ from each other in only one respect: A "singleTask" activity allows other activities to be part of its task. It's always at the root of its task, but other activities (necessarily "standard" and "singleTop" activities) can be launched into that task. A "singleInstance" activity, on the other hand, permits no other activities to be part of its task. It's the only activity in the task.
如果你不想出现2个task那么请移除你的
android:launchMode="singleInstance"
关于移除一个另一个也会关闭的情况:
所有的task都是从主应用打开的,你关闭主应用,所有的应该会同时关闭了
另一个情况,关闭这个activity task也会关闭的情况,应为你设定的process为
android:process="com.test.webivew"
,会关闭这个进程,你查看下是不是你application的process也设置为com.test.webivew最后提醒以下,除非你明确知道
android:launchMode="singleInstance"
和android:taskAffinity="com.lydiabox.webView"
的作用,否则请不要使用这两个参数。同时认真阅读上面链接的内容