capacitor-healthkit
capacitor-healthkit copied to clipboard
Getting Inaccurate data for steps via getStatisticsCollection in v2
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
``