Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getActivitySamples returns empty array #314

Open
KyleRosenberg opened this issue Jul 31, 2022 · 2 comments
Open

getActivitySamples returns empty array #314

KyleRosenberg opened this issue Jul 31, 2022 · 2 comments

Comments

@KyleRosenberg
Copy link

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
Copy link

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
Copy link

This has been covered in this previous issue: #207

The part that fixed it for me is: use Scopes.FITNESS_LOCATION_READ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants