Closed bps-takumaodaki closed 4 months ago
If I am not mistaken, that is an Android expected behaviour. First time, they let you "try again", since it might have been a mistake. After denying a permission twice, the functions asking for a permisson and showing a dialog to allow or deny, won't do it any longer.
@CarlosCabarcos Indeed, it was written here. https://developer.android.com/about/versions/11/privacy/permissions#dialog-visibility
Considering that as the correct behavior, it might be good to call revokeAllPermissions() from the app if necessary.
Since this is the expected behavior, I'll close this issue.
Device / Emulator and OS
Describe the bug
When you tap 'don't allow' twice on the permission screen, you will no longer be able to display that screen. You can reproduce this issue with the example app by following these steps:
→ The log shows "Access Denied (to Health Connect)!" and the permission screen will no longer be displayed.
Screenshots
https://github.com/cph-cachet/flutter-plugins/assets/111839744/54054f7f-40fd-4133-a43d-80d9ef9a5ca0
Additional information
After reproducing the issue, if you execute
healthConnectClient.permissionController.revokeAllPermissions()
and then executerequestAuthorization()
, the permission screen will be displayed again.