Flutter-permission-handler: Location permission status fetched as "undetermined" in Android, after permanately denyming

Created on 16 Sep 2020  路  5Comments  路  Source: Baseflow/flutter-permission-handler

馃悰 Bug Report

Steps to reproduce + expected behavior

  1. User clicks deny location permission in Android
  2. You ask for permission again, they click deny this time and also tick the checkbox "Do not ask again"
    Screenshot 2020-09-16 at 15 13 16

  3. afterward, next time we call the code below it has wrong result
    Result of

PermissionWithService lp = await ph.Permission.location;
await lp.isUndetermined

should be false

I expect
lp.isUndetermined or lp.isPermanatelyDenied to be true instead because undertermined as you document it is the initial status when the user does not select anything, but in case reported here customer selected "DENY" and also "Do not ask again"

Configuration

permission_handler: ^5.0.1+1

Platform:

  • [y] :robot: Android

Most helpful comment

You can try this : [ph.Permission.location.request().isPermanentlyDenied]. seem it is ok

All 5 comments

can confirm. same issue.

Same issue for me: Pixel 2, Android 11

You can try this : [ph.Permission.location.request().isPermanentlyDenied]. seem it is ok

You can try this : [ph.Permission.location.request().isPermanentlyDenied]. seem it is ok

You saved my day.
Thanks with heart

Hi,
To keep the issues on this repo more organized I am going to close this ticket, as I think it is a duplicate of #336 .
Don't hestitate to re-open if you think otherwise!

Was this page helpful?
0 / 5 - 0 ratings