Questions tagged [google-fit]

Google Fit is a an open platform that lets users control their fitness data.

Description

Google Fit is a an open platform that lets users control their fitness data.

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

https://developers.google.com/fit/

Android API

REST API

Samples

839 questions
46
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'
  • 64,635
  • 54
  • 168
  • 216
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
  • 247
  • 1
  • 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
  • 3,590
  • 9
  • 38
  • 69
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,297
  • 4
  • 19
  • 33
14
votes
4 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
  • 657
  • 7
  • 19
12
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
  • 1,890
  • 18
  • 37
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
  • 3,590
  • 9
  • 38
  • 69
12
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
  • 452
  • 4
  • 14
11
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
10
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ń
  • 11,495
  • 19
  • 75
  • 148
10
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
  • 757
  • 2
  • 10
  • 25
10
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
  • 141
  • 1
  • 5
10
votes
2 answers

Access Android Wear Fit Data

I'm developing an app for Android Wear on Samsung Gear Live (Google I/O Edition) where it will need access heart rate and steps count history data. I know that later this data might be accessible using Google Fit SDK, but is it possible to read that…
Maksim
  • 16,162
  • 25
  • 91
  • 128
9
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…
9
votes
1 answer

GoogleFit distinguish data between from different devices

I am using GoogleFit HistoryAPI for get step data from user. It's working well. However, in my case, I want to distinguish data between from different devices (using same account) because I don't want user using same account for 2 or more devices…
Linh
  • 43,513
  • 18
  • 206
  • 227
1
2 3
55 56