android.content.ReceiverCallNotAllowedException: 解决方法

来源:互联网 发布:淘宝小号点数是什么 编辑:程序博客网 时间:2024/06/07 06:32

官方明确表示不要在receiver中进行bind

1、bindService不能在BroadcastReceiver 中调用,你可以在里面调用StartService并把要传递参数放到intent中

2、registerReceiver不能在BroadcastReceiver调用,可以通过context.getApplicationContext().registerReceiver();解决,我测试成功


阅读全文
0 0
原创粉丝点击