Questions tagged [google-fit]

Google Fit is an open platform that lets users control their fitness data. Use this tag for questions about programming apps that interface with Google Fit or use any of its APIs or SDKs. General end-user support is off-topic.

Description

Google Fit is an open ecosystem that allows developers to upload fitness data to a central repository where users can access their data from different devices and apps in one location:

  • Fitness apps can store data from any wearable or sensor.
  • Fitness apps can access data created by any app.
  • User's fitness data is persisted when they upgrade their fitness devices.

References

967 questions
51
votes
7 answers

How is it possible that Google Fit app measures number of steps all the time without draining battery?

The Google Fit app, when installed, measures the duration you are walking or running, and also the number of steps all the time. However, strangely, using it does not seem to drain the battery. Other apps like Moves which seems to record number of…
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
21
votes
4 answers

Step Counter Google FIT API

I am currently trying to work with Google Fit API.This is my first App using the API, and I have been mainly by following Google's documentation. Below is the code that I have which seems to have a problem The problem I have is that it doesn't seem…
David
  • 239
  • 2
  • 3
  • 12
19
votes
1 answer

Android: How to get Google Fit data from Wearable device?

I'm following the same steps described here (the Google Fit client connection part is working fine). final DataType dataType=TYPE_STEP_COUNT_DELTA; DataSourcesRequest requestData = new DataSourcesRequest.Builder() …
user3290180
  • 4,260
  • 9
  • 42
  • 77
17
votes
5 answers

Step count retrieved through Google Fit Api does not match Step count displayed in Google Fit Official App

I have developed an application that needs to display daily steps count. To do this, I used the API available in Google Fit SDK. All seems to be working properly, but the steps count I get does not match to the one displayed in Google Fit Official…
Thomas Thomas
  • 824
  • 1
  • 9
  • 21
15
votes
3 answers

How do I retrieve step count data from Google Fitness REST api?

Since I installed the Google Fit app on my Nexus 5 it has been tracking my step count and time spent walking. I'd like to retrieve this info via the Google Fitness REST api (docs) but I can't work out how to get any of that data from the REST…
user4025880
14
votes
1 answer

Google Fit SessionsApi not returning all sessions in time range

Somehow I've run into a dead end with the Google Fit Android SDK. Currently I'm building an application that reads, displays and processes data from Google Fit to give users insights on their workout behavior. My situation is as follows: I used to…
damian
  • 2,001
  • 20
  • 38
14
votes
3 answers

Get Current Activity from Google Fit API Android

I am working on demo application to get current activity sample using Google Fit. I can get Speed as well as Distance correctly. But it is not returning "in_vehicle" or "biking" state very frequently though I was in the same state. Find attached…
steve
  • 1,365
  • 4
  • 19
  • 33
13
votes
3 answers

Exception while trying to access Google Fit API - The user must be signed in to make this API call

I am trying to set up a wearable app (for Huawei Watch 2) running on WearOS to provide a sort of continuous feed of Heart Rate (BPM) into a Google Fit account, which is read into another smartphone application. The issue comes when I am trying to…
Raul Acu
  • 171
  • 1
  • 8
13
votes
2 answers

Step Counter in Android: always on?

It is a well known issue that many Android phones switch off the accelerometer when the screen goes off. However something seems to have changed with Android Fit (the app). Fit keeps counting steps even when the screen goes off. If Fit is installed,…
FabioC
  • 462
  • 5
  • 14
12
votes
1 answer

Fetch Google Fit history same way Google Fit app does (Google Fit auto recorded activities)

I'm trying hard to display same history of activities as Google Fit app does. I do just fine with sessions, but I just can't grasp the auto-recorded activities properly. Like these two top walks in the example. I think everything goes down to the…
Jacek Kwiecień
  • 12,397
  • 20
  • 85
  • 157
12
votes
2 answers

Obtain a new token by refresh token with google_sign_in Flutter

I'm writing an application that call google fit rest api from Flutter. I need to sign with google using (https://pub.dev/packages/google_sign_in). I can obtain a token without problem (see Did anyone manage to get the id token from google sign in…
Alessandro Verona
  • 1,157
  • 9
  • 23
12
votes
3 answers

Android ACTIVITY_RECOGNITION Permission SDK 28 running on Android 10/Q (SDK 29)

My Android app targets SDK 28 and connects to Google Fit to upload data and read some other data. The app uses the HistoryAPI to read com.google.step_count.delta data. This documentation claims that…
12
votes
1 answer

Google Fit API: ApiException 17 (Fitness.CLIENT is not available on this device)

The Google Play documentation claims this is an API_NOT_CONNECTED code, however I have done everything I (think I) have to do in order to access the Google Fit API. Attempting to use Fit API on an Android Wear watch. I have a Main Activity, which…
drnessie
  • 877
  • 2
  • 12
  • 25
12
votes
1 answer

Android Wear and Google Fit: How to force update of datasets between smartwatch and smartphone?

From the smartphone by using HistoryAPI If I ask for user's history and DataType.TYPE_HEART_RATE_BPM for the last past hour, starting from the current time, I miss data from the last half hour. If I ask them to Google Fit with the same procedure…
user3290180
  • 4,260
  • 9
  • 42
  • 77
11
votes
2 answers

Using Google Fit APIs without Google Fit app

Can the Google Fit APIs be used without having the Google Fit APP? I want to use the Google Fit APIs to count number of steps but can this be done without having to install the Google Fit App.
user2424586
  • 151
  • 1
  • 5
1
2 3
64 65