大家好,又见面了,我是你们的朋友全栈君。
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://javaforall.net/155491.html原文链接:https://javaforall.net