返回状态问题
Closed this issue · 3 comments
VinRichard commented
拒绝权限和拒绝不在提示的状态么法区分,不知道其他人有么有遇到这个问题
longalei commented
if (permission.granted) {
Toast.makeText(MainActivity.this,
"granted permission",
Toast.LENGTH_SHORT).show();
} else if (permission.shouldShowRequestPermissionRationale) {
// Denied permission without ask never again
Toast.makeText(MainActivity.this,
"Denied permission without ask never again",
Toast.LENGTH_SHORT).show();
} else {
// Denied permission with ask never again
// Need to go to the settings
Toast.makeText(MainActivity.this,
"Permission denied, can't enable the camera",
Toast.LENGTH_SHORT).show();
}
Jazero commented
rxPermissions.ensureEach(Manifest.permission.CAMERA) 中返回generices :<T, Permission> 。然后在用上面答案。
tbruyelle commented
Please write the issue in english.