自定义广播
发送广播sendBroadcast(intent)发送的无序广播
sendOrderedBroadcast(intent,null)发一条有序的广播,优先级高的先接受到
清单文件中指定优先级priority=“1000”
1000是最大的
高优先级的广播接受者可以终止广播并且高优先级别的广播接受者发送的广播,我们通过普通注册的广播是接收不到高优先级发送的广播的。
如果发的无序的广播,是不能被拦截的,高优先着也不能设置广播内容了
自定义广播需要在清单文件中配置
<receiver android:name="com.itheima.ipdail.OutCallReceiver" >
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL"></action>
</intent-filter>
</receiver>
发送广播sendBroadcast(intent)发送的无序广播
sendOrderedBroadcast(intent,null)发一条有序的广播,优先级高的先接受到
清单文件中指定优先级priority=“1000”
1000是最大的
高优先级的广播接受者可以终止广播并且高优先级别的广播接受者发送的广播,我们通过普通注册的广播是接收不到高优先级发送的广播的。
如果发的无序的广播,是不能被拦截的,高优先着也不能设置广播内容了
自定义广播需要在清单文件中配置
<receiver android:name="com.itheima.ipdail.OutCallReceiver" >
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL"></action>
</intent-filter>
</receiver>