精通android学习笔记(一)---广播

  普通广播:sendBroadcast

  有序广播:sendOrderedBroadcast,有序广播优先级可以再manifest中设置,数值越大,最先收到。-1000~1000

 <receiver android:name=".B">
       <intent-filter android:priority="3">
           <action android:name="action.string" />
       </intent-filter>         
   </receiver>

  有序广播可以被停止: this.abortBroadcast();,普通广播调用该方法会抛异常!

  广播是可以跨进程的。

原文地址:https://www.cnblogs.com/deman/p/4135317.html