Right now, when you check the permission status using
PermissionHandler().checkPermissionStatus(...)
the status returned is always PermissionStatus.denied no matter if you had already asked for permission and user denied it before or this is the first time you are asking for the permission.
Correct behavior would be if you had asked for the permission before, user denied it and you are checking permission status using above code, the status should be PermissionStatus.denied (which is working as expected) BUT if we have not asked for the permission before, the status returned should be PermissionStatus.unknown.
Android
2.2.0
@dark-chocolate I also struggled with this before but unfortunately it is not how Android works. On Android by default permissions are denied (no matter if permissions have been asked before or not). So on Android you always start out with PermissionStatus.denied and go from there.
Here is the official Android explanation (full article can be found here):
If the app has the permission, the method returns PERMISSION_GRANTED, and the app can proceed with the operation. If the app does not have the permission, the method returns PERMISSION_DENIED, and the app has to explicitly ask the user for permission.
Most helpful comment
@dark-chocolate I also struggled with this before but unfortunately it is not how Android works. On Android by default permissions are denied (no matter if permissions have been asked before or not). So on Android you always start out with
PermissionStatus.deniedand go from there.Here is the official Android explanation (full article can be found here):