Closed eygraber closed 7 years ago
@eygraber did you try invoking this?
Dexter.withActivity(activity)
.withPermission(permission)
.withListener(listener)
.check();
or invoking token.continuePermissionRequest();
instead of PermissionToken.cancelPermissionRequest
?
Here's the flow for cancelPermissionRequest
:
Dexter.withActivity(activity).withPermission(permission).withListener(listener).check();
In the rationale callback I call token.cancelPermissionRequest()
I later call Dexter.withActivity(activity).withPermission(permission).withListener(listener).check();
again but the permission dialog is not shown
Flow for continuePermissionRequest
:
Dexter.withActivity(activity).withPermission(permission).withListener(listener).check();
In the rationale callback I call token.continuePermissionRequest()
I later call Dexter.withActivity(activity).withPermission(permission).withListener(listener).check();
and the permission dialog is shown
If you invoke token.cancelPermissionRequest()
you are telling the library the user doesn't want to accept your permission and the library won't show the final dialog. This is the expected behavior. If you want to show the Android native dialog always you should invoke token.continuePermissionRequest()
.
If you think there is something wrong with the lib or you've found a bug, it could be great if you create an example project and explain your expected behavior. Based on this we'll be able to easily give you feedback or fix the bug 😃
I see. I think that's a cool feature, but there should be a way to reverse it if necessary. Otherwise we can never ask the user for that permission again.
@eygraber the Google permissions systems works like this. The idea of the token is that you can show some feedback to the user explaining why you are going to ask for that permission. The user experience designed by google is something we can't change from our library even when we'd like 😃
I guess you've got the answer to your question, so I'm closing this issue. Thanks!
That's not really accurate, because with Google we can direct the user to the app settings to manually turn the permission on. With this, there's no way to go back. So even if the user didn't check the "Don't ask again" on the permission prompt, I can't ask them again.
Showing a rationale dialog while asking for the permission is not mandatory. You don't even have to ask for a yes/no question and just show a dialog saying "we need this permission because...". If I'm not wrong, this is more related to the UX than the library it self. @Serchinastico any other thought?
@eygraber the Google permissions systems works like this. The idea of the token is that you can show some feedback to the user explaining why you are going to ask for that permission. The user experience designed by google is something we can't change from our library even when we'd like 😃
I guess you've got the answer to your question, so I'm closing this issue. Thanks!
Can you give the reference link where Google said it?
If I call
PermissionToken.cancelPermissionRequest
how can I get the library to start making permission requests for that permission again?