RxPermissions
RxPermissions copied to clipboard
isGranted is always true
the code is like below:
`new RxPermissions(getActivity()) .request(CAMERA, RECORD_AUDIO) .subscribe(new Action1<Boolean>() { @Override public void call(Boolean isGranted) { if (isGranted) {
} else {
}
}
});`
firstly , the "isGranted" is true , and then the phone show the permission dialog , I click refuse , but next time , the "isGranted" is also true
the android os version is : 6.0.1
firstly , the "isGranted" is true , and then the phone show the permission dialog
No. The Action1
is only invoked when user has answered all permission dialog requests.
I have encountered the same problem, may I ask this question solved?
@yuxinLi @ChinaDragon01 do you have some example project for reproducing it?
I had encountered the same problem.Then I changed the targetSdkVersion to be great than or equal to 23, It solved.
// when targetSdkVersion < Build.VERSION_CODES.M(23), calling like below: // ContextWrapper.checkSelfPermission or Context.checkSelfPermission , // it will always return PERMISSION_GRANTED i will give a pr of that