Questions tagged [google-fit-api]

The Google Fit REST API enables you to store and access user data in the fitness store from apps on any platform.

The Google Fit REST API provides resources and methods to:

  • Create, obtain, list, and modify data sources. A data source represents a unique source of sensor data. All fitness data in the fitness store is associated with a particular data source.

  • Create, obtain, aggregate, and delete datasets. A dataset represents a set of data points from a particular data source.

  • List data points and add them to a dataset. A data point represents a sample from a particular data source.

  • Create, list, and delete sessions. A session represents a time interval with associated metadata.

116 questions
1
vote
0 answers

Google Fit API request returning empty points for steps (Node.js)

Im following a video tutorial on how to use the google fit API for checking steps with node.js and managed to make everything work. My problem is, when getting the value of steps, the pointarray is returning empty. Examples Here are some examples on…
Pedro Fontes
  • 164
  • 2
  • 12
1
vote
0 answers

Google Fit API works only in specific conditions

I have set up Google Fit API in my Android application coded in Java. It works perfectly when I debug the code on the phone directly connected to the computer. I've tried with multiple devices and everything is working well. When I build the apk, it…
1
vote
0 answers

Steps sync to wrong day when I bucketByTime with TimeUnit.DAYS as 1

We have several customers reported this kind issues, for example, a user have 1,361 steps at day 11/17/2021, but 0 steps at 11/18/2021, but the google's app "google fit" shows 149 steps at 11/17 and 1,212 steps at 11/18. we read log to see a…
1
vote
1 answer

Not able to get dataStreamName : from_activities from google datasource list to fetch Calories

I am using google fit datasource API https://www.googleapis.com/fitness/v1/users/me/dataSources to get the data sources. For calories, I was using below data stream: dataStreamName : from_activities dataStreamId :…
1
vote
0 answers

Flutter Health Plugin "Authorization not granted" in Foreground Service Function

I am trying to create an app about periodically fetching step data from Google Fit API and send that data to custom API. So far everything is ok and works fine while app is open. Then I wanted to make these things happen even if i kill the app. For…
1
vote
1 answer

Getting activities list with a distances in Google Fit API (REST)

I need to get a list of recent activities in Google Fit, including the distance traveled. I am using direct REST API requests (PHP via cURL). First, I do authorization via oAuth…
Max
  • 664
  • 1
  • 6
  • 19
1
vote
3 answers

Google Fit API SleepSession returns empty sleep sessions array Kotlin

I'm trying to read sleep data from Google Fit. The sessionsClient reads from Fit successfully, however, it does not return any sessions in response.sessions even though there are sleep sessions logged in Fit. Due to the API update being relatively…
1
vote
3 answers

Do I have to update Google Fitness SDK v20 before April 27th even if we use only using read-only?

Will apps that only use the Google Fitness SDK to read steps be affected by the April 27th specification change of Google Fit? We build by v11.8.0, do we need to change to v20 and distribute to the Google Play Store before the April 27th? If I don't…
1
vote
0 answers

Session limit of 10000 exceeded

Starting at around 2021-03-24 03:44:19.552 -07:00, we started getting the following error for any Session Request -- I have attempted to reduce the time period, but to no avail. Please…
1
vote
1 answer

Google Rest Apis and google sign in

I've successfully used the google sign in library to create a google sign-in button, request additional scopes however I'm having trouble figuring out how to translate this into a API request. I'm using googleUser.getAuthResponse().id_token and…
Chris
  • 87
  • 2
  • 10
1
vote
1 answer

403 Error creating dataSource for com.google.blood_pressure in Google Fit REST API

Goal: I have a simple web application where I submit my Blood Pressure and Heart Rate measurements. Now I'd like to submit these measurements to my Google Fit Account. I tried Googles tutorial:…
DKPillo
  • 9
  • 1
1
vote
2 answers

No Datasources for `DataType.TYPE_HEART_RATE_BPM` even when watch connected

I have a wearable device where Google Fit is connected with the same account as of my phone. The wearOS device is also connected to my phone. However the following code returns no data sources corresponding to the DataType.TYPE_HEIGHT,…
Arka Prava Basu
  • 2,366
  • 3
  • 18
  • 34
1
vote
1 answer

Google Fit get heart rate data

I would like to get my heart rate data stored on Google Fit. Through this page I can try the API: https://developers.google.com/fit/rest/v1/reference/users/dataSources/datasets/get?apix=true and work because the json result is: { "minStartTimeNs":…
1
vote
2 answers

What data source ID to use for Google Fit REST heart rate query?

I'm trying to retrieve aggregate daily heart rate summary data using the Google Fit REST API, but I'm struggling because either I'm missing something or the documentation seems to be very incomplete. I've successfully managed to retrieve aggregate…
James Allen
  • 6,406
  • 8
  • 50
  • 83
1
vote
1 answer

[google-fit]; write my blood sugar data to Google Fit, but something went wrong(REQUIRES_APP_WHITELISTING) during the test

"OAuth 2.0 Client ID" was successfully obtained,but "OAuth consent Scree" was not verified FitnessOptions fitnessOptions = FitnessOptions.builder() .addDataType(HealthDataTypes.TYPE_BLOOD_GLUCOSE,FitnessOptions.ACCESS_WRITE) …
闵钰春
  • 11
  • 1