getActivitySamples returns empty array
KyleRosenberg opened this issue · 2 comments
KyleRosenberg commented
I have the following code, which prints [] to the console. However I have many activities listed in the Google Fit app. How can I modify my code to return my activities?
const options = {
startDate:"2022-07-31T00:00:00-06:00",
endDate:"2022-07-31T23:59:59-06:00"
}
GoogleFit.getActivitySamples(options).then(res => {
console.log(res);
}
pavelbabenko commented
Same issue. The library doesn't return activities that are listed in Google Fit. However, steps from activities are returned in getDailySteps()
julian-kingman-lark commented
This has been covered in this previous issue: #207
The part that fixed it for me is: use Scopes.FITNESS_LOCATION_READ