I'm using RxPermissions to handle permissions in my Android app.
For example I have the following code inside a button's onClickListener
Disposable mDispo = new RxPermissions(this)
.request(Manifest.permission.READ_CALENDAR, Manifest.permission.WRITE_CALENDAR)
.subscribe(isAllowed -> {
if (isAllowed) {
setResult(RESULT_OK);
finish();
} else ExtensionsKt.showPermisionRequiredDialog(this);
});
When the button is pressed it will show the following dialog.
But If I check the Don't ask again option and press DENY, the dialog will not appear again and the user is pretty much stuck until he changes the permission from the app settings.
For that I made a custom dialog that will be triggered when isAllowed is false but now the problem is that the custom dialog will appear even if the user doesn't check the Don't ask again checkbox, just by simply pressing DENY.
How can I make the custom dialog appear at the next button click only if the user has checked the Don't ask again option previously?
