tbruyelle / RxPermissions

Android runtime permissions powered by RxJava2
Apache License 2.0
10.49k stars 1.31k forks source link

点击dialog外侧,dialog也会取消,且shouldShowRequestPermissionRationale=flase #346

Open githubxiaoou opened 3 years ago

githubxiaoou commented 3 years ago

disposable = rxPermissions.requestEach(permission.CALL_PHONE, permission.CAMERA) .subscribe(new Consumer() { @Override public void accept(Permission permission) throws Throwable { if (permission.granted) { Log.e(permission.name, "granted"); } else if (permission.shouldShowRequestPermissionRationale) { Log.e(permission.name, "shouldShowRequestPermissionRationale"); } else { Log.e(permission.name, "denied"); } } });

权限对话框是可取消的,点击dialog外侧取消后,走的也是else分支。这时候去过else里面写的是引导用户去设置页的逻辑,就不大合适。希望能够区分开:不再询问的禁止 和 点击dialog外侧取消。

githubxiaoou commented 3 years ago

更正:点击dialog外侧取消的时候,permission.shouldShowRequestPermissionRationale取的是最近一次的赋值。

YaweiWang commented 6 months ago

更正:点击dialog外侧取消的时候,permission.shouldShowRequestPermissionRationale取的是最近一次的赋值。

大佬后来是怎么解决的这个问题啊

KarlLargerFeld commented 6 months ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。