StasDoskalenko / react-native-google-fit

A React Native bridge module for interacting with Google Fit
MIT License
333 stars 209 forks source link

Incorrect Calorie Data Returned by getDailyCalorieSamples #366

Open BharathMarla932 opened 2 months ago

BharathMarla932 commented 2 months ago

The getDailyCalorieSamples method is returning incorrect calorie data for the current day. The value returned by the method is significantly lower than the value displayed in the Google Fit app.

Here is my code :

const opt = { startDate: "2024-07-24T00:00:00.000Z", endDate: new Date().toISOString(), bucketUnit: BucketUnit.DAY, };

GoogleFit.getDailyCalorieSamples(opt) .then((res) => { console.log(res); }) .catch((error) => { console.error('Error retrieving calorie samples:', error); });