cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
527 stars 625 forks source link

[Health 10.2.0] Unable to transition to Health Connect permission screen after tapping 'don't allow' twice #987

Open bps-takumaodaki opened 1 week ago

bps-takumaodaki commented 1 week ago

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:

  1. Ensure Health Connect is installed but has not yet called requestAuthorization(), then launch the app.
  2. Tap the "Fetch Step Data" button and then tap "don't allow" on the permission screen.
  3. Repeat step 2.
  4. Tap the "Fetch Step Data" button.

→ 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 execute requestAuthorization(), the permission screen will be displayed again.