Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

REQUEST ALL in sample example not working as expected #200

Open cmeng-git opened 6 years ago

cmeng-git commented 6 years ago

Thanks for the excellent Dexter library. Trying to use it on aTalk; but observe the following when trying the SampleActivity downloaded from the master repository (v4.2.0) The Dexter is installed on Note 8.

Expected behaviour

Click on the RequestAll button launches the showPermissionRationale dialog as expected. It should then wait for user to click on the OK button before proceed to prompt user with the Permission Request dialog.

Actual behaviour

After the launch of the showPermissionRationale dialog. it immediately proceeds to show the Permission Request dialog without user clicks on the OK button; and obscures the showPermissionRationale dialog message until user has answered all the permission requests.This confuses the user.

I try to trace where the token.continuePermissionRequest(); is being executed even before the user click on the OK button but not successful.

Steps to reproduce

See above

Version of the library

version 4.2.0 master source

monowar1993 commented 6 years ago

@Laura-karumi please look at the issue. I also have the same problem on 8.0. Actually Background thread permission listener works as expected. But sample permission listener shouldshowretional dialog is messed up. Its asking for permission before I press ok button. Please do check.