开发者

Are broadcast receivers guaranteed to receive every broadcast announcement intended for them?

开发者 https://www.devze.com 2023-02-08 03:32 出处:网络
A fellow developer and I have started to question whether a broadcast announcement is guaranteed to be received by the appropriate broadc开发者_如何学Goast receiver.

A fellow developer and I have started to question whether a broadcast announcement is guaranteed to be received by the appropriate broadc开发者_如何学Goast receiver.

We have a broadcast receiver which receives messages that should be put on to the screen. Occasionally we notice that some messages never make it to the screen.

Even with the debugger, it has been hard to tell for certain if the receiver is not getting the broadcast or if it due to our own bugs that the broadcast is never sent.

So I wanted to ask generally if there are any known reasons why the broadcast receiver would not receive an announcement?


There are ordered broadcasts in Android. They are sent to receivers according to the receivers priority. And receiver with a higher priority can abort the broadcast spreading. See this blog post for details.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号