capacitor-healthkit icon indicating copy to clipboard operation
capacitor-healthkit copied to clipboard

Getting Inaccurate data for steps via getStatisticsCollection in v2

Open Rahul-codoffer opened this issue 4 months ago • 2 comments

Getting inaccurate step count form getStatisticsCollection method via v2

let startDate = "2024-10-07T00:00:00.000Z";
let endDate = "2024-10-07T23:59:59.000Z";
let anchorDate = "2024-10-07T00:00:00.000Z";
      
await CapacitorHealthkit.getStatisticsCollection({
        startDate,
        endDate,
        interval: {
          unit: 'day',
          value: 1
        },
        anchorDate,
        quantityTypeSampleName: 'stepCount',
      }).then(async (res: any) => {
        console.log("health data step", res);
      });
      
Received response - [ {
            "value": 12252,
           "startDate": "2024-10-07T00:00:00Z",
           "endDate": "2024-10-08T00:00:00Z"
       }]

But there is total 13,121 steps in my apple health

IMG_1328

``

Rahul-codoffer avatar Oct 13 '24 14:10 Rahul-codoffer