cph-cachet / flutter-plugins

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

health 10.2.0 isManualEntry always false #947

Open LorisTrainect opened 2 months ago

LorisTrainect commented 2 months ago

Device / Emulator and OS

Please complete the following information for each phone and/or emulator you're experiencing this bug on:

Describe the bug

I have done several tests by changing the value of includeManualEntry and then printing the data points, includeManualEntry seems to work correctly and excludes the values I manually added on google fit. However when it is true, the values I added manually are marked as false by isManualEntry. At the moment I have only tried it on google fit but I wanted to point this out, the documentation also about these parameters is very lacking so I don't even know if this is correct behavior because it is a limitation of google fit or not.

  List<HealthDataPoint> stepsList = await health.getHealthDataFromTypes(
              startTime:  dateStart,
              endTime: now,
              types: [HealthDataType.STEPS],
              includeManualEntry: true
          );

          for(HealthDataPoint stepsData in stepsList){

             print("Steps:");
             print(stepsData.value);
             print(stepsData.isManualEntry);
             print(stepsData.dateFrom);
          }

To Reproduce

Using google fit add steps and print the isManualEntry value

Expected behavior

isManualEntry value is true for the data point i have added

Actual behavior

isManualEntry value is always false

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Versione 10.0.22631.3374], locale it-IT) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.5) [√] Android Studio (version 2023.2) [√] VS Code, 64-bit edition (version 1.70.0) [√] Connected device (5 available) [√] Network resources

• No issues found!

Amrazyan commented 2 weeks ago

Did you find the solution?

LorisTrainect commented 2 weeks ago

No actually not, it would be useful for us to take only the data not manually added but given this problem it is not possible and we have not found solutions