精通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();,普通广播调用该方法会抛异常!
广播是可以跨进程的。
posted on 2014-12-01 16:11 Joyfulmath 阅读(172) 评论(0) 编辑 收藏 举报