Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么 onNewIntent() 不与 singleInstance 启动模式一起使用?我的意思是,如果我重新启动我的 singleInstance Activity,我可能仍然想获得那个新的 Intent,对吧?
它确实被调用。
如果您启动一个Activity已经在一个任务launchMode="singleInstance"中Activity运行的,该任务将被带到前台并被onNewIntent()调用。
Activity
launchMode="singleInstance"
onNewIntent()