BroadcastReceiver 的 onReceive 方法是否总是在动态注册时调用?

Is a BroadcastReceiver's onReceive method always called the moment it gets registered dynamically?

我注意到每次我使用 registerBroadcastReceiver 在 onResume 中注册时我的 wifi 状态 BroadcastReceiver 都会被触发。这是默认行为吗?

有些广播很粘。这意味着它们将在广播后 'stick' 传播,以便新的接收者在注册时立即收到它们。

An intent that is used with sticky broadcast, is called as sticky intent. This intent will stick with android system for future broadcast receiver requests.

参见: