高版本Android直接发送广播是无法接收的
e.g.
1 sendBraodcast(intent);
需要在前面加上(前一个String为接收广播应用的项目地址,后一个为该广播类的地址)
1 intent.setComponent(new ComponentName("com.example.broadcasttest","com.example.broadcasttest.MyBroadcastReceiver"));
高版本Android直接发送广播是无法接收的
e.g.
1 sendBraodcast(intent);
需要在前面加上(前一个String为接收广播应用的项目地址,后一个为该广播类的地址)
1 intent.setComponent(new ComponentName("com.example.broadcasttest","com.example.broadcasttest.MyBroadcastReceiver"));
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。