当 activity 从 intent 恢复时调用哪个 void

Which void is called when activity gets resumed from intent

在我当前的应用程序中,HomeActivity (singleTask) 启动了 BootActivity。 BootActivity 通过 startActivity 再次启动 HomeActivity。再次把HomeActivity调到最前面时调用了哪个void(还没有在后台停止移动运行),不是onResume吗?

谢谢

当 Activity 已创建时,使用新 Intent 调用 onNewIntent () 方法:

This is called for activities that set launchMode to "singleTop" in their package, [...].

An activity will always be paused before receiving a new intent, so you can count on onResume() being called after this method.

但是 onResume() 会在 Activity 暂停时被调用。由于 BootActivity 处于活动状态,HomeActivity 已暂停,即使它可能没有停止。