FLAG_ACTIVITY_NEW_TASK介绍

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(),而不是创建新的。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgjjwj.html