报错信息如下:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qxueyou.learning/com.yanzhenjie.permission.bridge.BridgeActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.APP_NOTIFICATION_SETTINGS dat=package:com.qxueyou.learning (has extras) }
OPPO 部分手机请求通知栏权限时报错 代码如下
AndPermission.with(activity) .notification() .permission() .rationale(new Rationale<Void>() { @Override public void showRationale(Context c, Void d, final RequestExecutor executor) { // 没有权限会调用该访问,开发者可以在这里弹窗告知用户无权限。 // 启动设置: e.execute(); // 取消启动: e.cancel(); executor.execute(); } }) .onGranted(new Action<Void>() { @Override public void onAction(Void data) { // 可以发送通知。 ToastUtil.showShort("失败"); } }) .onDenied(new Action<Void>() { @Override public void onAction(Void data) { ToastUtil.showShort("拒绝"); // App不能发送通知。 } }) .start();
报错信息如下: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qxueyou.learning/com.yanzhenjie.permission.bridge.BridgeActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.APP_NOTIFICATION_SETTINGS dat=package:com.qxueyou.learning (has extras) }