安卓 8.0 自定义注册的静态广播作用解决办法

版权声明:独学而无友,则孤陋寡闻。q群582951247 https://blog.csdn.net/mp624183768/article/details/82772357
Intent intentOpen = new Intent(AreaInspectLivebroadcast.OPEN_VIDEO_BD);
intentOpen.putExtra("type", AreaInspectLivebroadcast.OPEN_VIDEO_BD);
intentOpen.putExtra("title", getString(R.string.web_bd));
intentOpen.putExtra("content", getString(R.string.web_live_bd));
//兼容安卓8.0  参数为(应用包名,广播路径) 加上这句就好啦
intentOpen.setComponent(new ComponentName(getApplication().getPackageName(),
        "com.common.x.areainspect.LiveBroadCastReceiver"));
sendBroadcast(intentOpen);

猜你喜欢

转载自blog.csdn.net/mp624183768/article/details/82772357