FLAG_ACTIVITY_NEW_TASK
Start the activity in a new task. If a task is already running for the activity you are now starting, that task is brought to the foreground with its last state restored and the activity receives the new intent in onNewIntent().
This produces the same behavior as the “singleTask” launchMode value, discussed in the previous section.
以上是谷歌官网的描述,里边的意思很清楚了,当有task运行了你要运行的activity,这个task会到前台并,并且这个activity会回调onNeewIntent(),而不是创建新的。

版权声明:本文为younghome原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/younghome/p/4608987.html