cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
554 stars 681 forks source link

[Health 10.2.0] Unable to set useHealthConnectIfAvailable to false after setting it to true. #969

Closed sezer-healthlogix closed 3 months ago

sezer-healthlogix commented 5 months ago

Device / Emulator and OS

Android

Describe the bug

There's an issue where when useHealthConnectIfAvailable is set to true it is unable to be set back to false. This locks the user into health connect even after setting back to false.

To Reproduce

Set:

      final health = Health();
      await health.configure(
        useHealthConnectIfAvailable: true,
      );

Then try to set it back to false:

      final health = Health();
      await health.configure(
        useHealthConnectIfAvailable: false,
      );

It will still attempt to use Google fit as useHealthConnectIfAvailable does not get updated.

Expected behavior

Expected to be able to retrieve Google fit data after setting useHealthConnectIfAvailable to false.

Actual behavior

As useHealthConnectIfAvailable is stuck on true it still tries to retrieve health connect data instead of google fit

SlimShadyIAm commented 3 months ago

Version 11.0.0 removes support for Google Fit, so unfortunately we will not be able to resolve this issue.