广播是应用于系统、应用、控件、线程间消息响应的组件
![](https://img-blog.csdnimg.cn/img_convert/b352c2f2fc42d92813380af7363bd384.jpeg)
注册receriver(静态或动态)
![](https://img-blog.csdnimg.cn/img_convert/cf60a3fe0d5d52df786a181cac787809.png)
调用sendBroadcast()方法发送广播
onReceive(Contextcontext,Intentintent)方法处理广播
静态广播
![](https://img-blog.csdnimg.cn/img_convert/676a0d5edb430c0221f321d334a84d6f.png)
![](https://img-blog.csdnimg.cn/img_convert/c0dcda7e7749e7e1507161db5e90ba19.png)
动态广播
![](https://img-blog.csdnimg.cn/img_convert/cd253540d2cd8e254add18616129a1b2.png)
![](https://img-blog.csdnimg.cn/img_convert/551413fd49a2d6ceaba31bb094a4271a.png)
有序广播
![](https://img-blog.csdnimg.cn/img_convert/d1961938058c9af6f9fe3c9f8af26fa4.png)
![](https://img-blog.csdnimg.cn/img_convert/d8f3a79b9d7852a862e495bb92b26a9f.png)
普通广播(无序广播):发出广播后,几乎所有接收器会在同一时间收到这条广播
有序广播:
同步执行的一种广播发出广播后,同一时间只有一个广播
接受者能收到,当这个广播接收者的逻辑执行完后,才会传
递到下一个接收者:当然前面的接受者还可以阶段广播的
继续传递,那么后续接受者就无法收到广播信息了
粘性广播
![](https://img-blog.csdnimg.cn/img_convert/5e23b9fb0f89dd009d1a7582c13fa2cc.png)
![](https://img-blog.csdnimg.cn/img_convert/ecea4567fd4f7143ae1baf38db3811df.png)
![](https://img-blog.csdnimg.cn/img_convert/332348af0b259d14ba075e42bb53a6a1.png)
![](https://img-blog.csdnimg.cn/img_convert/3910f35b51d1650859c71df33c365906.png)
![](https://img-blog.csdnimg.cn/img_convert/8826f2f26b64504ad03bad216ea8dcd8.png)