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

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);

你可能感兴趣的:(所遇技术问题)