Join the community to learn about and discuss the Google Fit SDK.
See all
Members (3,370)
Bill Strathearn's profile photo
Google Developers's profile photo
Gustavo Moura's profile photo
Lisa Wray's profile photo
Matt Sullivan's profile photo
Michelle Haq's profile photo
Paul Saxman's profile photo
Satinder Singh's profile photo
Shai Barack's profile photo
ada koda's profile photo
Adam Smith's profile photo
100001091057100001 1's profile photo
adam weiss's profile photo
Aaditya Maheshwari's profile photo
Adam Whitelaw's profile photo
Aan Olix's profile photo
Aaron Blakeley's profile photo
Aaron Gillespie's profile photo
Adam Stroud (adstro)'s profile photo
Adam Imbriglio's profile photo
Abhishek Sarnaik's profile photo
Abhijith C's profile photo
abbey west's profile photo
Adam Baker-Siroty's profile photo


Join this community to post or comment
Pinned by moderator

Google Developers

Announcements  - 
Hi everyone,

The wait is finally over! We’ve just announced the Google Fit Developer Challenge grand prize winners. Head over to the blog to check them out:

The grand prize winners and many runner up developers will be receiving their devices from +adidas+Android, Polar, and +Withings in the post soon.

Thanks again to everyone who took part!
Duncan Jaffrey's profile photoEdwin Ferdian's profile photoSarah Tsui's profile photocamelia boban's profile photo
How often do these challenges take place?  I very recently developed an app that integrates with Google Fit and I would have loved to enter!
Add a comment...
Hi guys,
I am building an app based on google fit data using android api.
Some days ago I was able to fetch data from the server using ".enableServerQueries()", but from today there is no data. Every thing is 0. Am I missing something? I didn't change the code, I was getting steps count, distance, etc. 
Add a comment...
Is it a limitation that you cannot upload data prior to 5 years ago into Google Fit?  Seems like when I do, I get an undescriptive "bad request" -- as soon as I get closer to May 4th 2010, it starts to work again.  Expected?
Satinder Singh's profile photoBill Strathearn's profile photo
Yes, 5 years is the current limitation but we'll update this to be 20 years in a change that is due to be available by the end of the week. 
Add a comment...
I created an Android Wear watch face ( which uses Google Fit to display the users steps, biking/walking/running duration. But I'm still having some problem getting a value for these activities which corresponds to the Google Fit app, and Google Fit website. 

For me it always seems to be the same as the Google Fit app, which is good, but some users are reporting that this is not the case! The Google Fit website always shows a different value from the Google Fit app? How is this possible, and why is there not a single way of retrieving these values? It is really hard to explain to users why it is not showing the same value..

Or am I doing something wrong?
Satinder Singh's profile photoPujie Wear's profile photo
+Satinder Singh Ok, great! Thanks for your reply..
Add a comment...
Hello everybody,

I need some help !

I work with the PHP Google Client and the Google Fit API.

I want to retrieve steps data from the API. But as an other person on this community, I don"t get any data with this REST call:

Please, can you explain why ?
I did a stackoverflow post :
Andy Rohan's profile photoMichel Edighoffer's profile photo
No problem Andy!
Add a comment...
Every time I take my son for a ride in his stroller my activity shows up as bicycling rather than steps.  I have a Nexus 5 and a Moto 360 synced to it.  
Alexander Gee's profile photoPierre Benayoun's profile photo
I think like +Duncan Jaffrey . 

By holding the stroller, The moto 360 analyse a pattern like your holding a bike's handlebar.

So it's deduce you're biking.... 
Add a comment...
Hello ! I'm trying to delete steps data using the sample provided in github and I have this error :

java.lang.IllegalArgumentException: Specific data source/type already specified for deletion. DataSources: [] DataTypes: [DataType{[steps(i)]}]

Anyone to help me ? :)

Thanks !

DataDeleteRequest request = new DataDeleteRequest.Builder()
                .setTimeInterval(startTime, endTime, TimeUnit.MILLISECONDS)

Fitness.HistoryApi.deleteData(mClient, request)
                .setResultCallback(new ResultCallback<Status>() {
                    public void onResult(Status status) {
                        if (status.isSuccess()) {
                            Log.d(TAG, "Successfully deleted today's step count data");
                        } else {
                            // The deletion will fail if the requesting app tries to delete data
                            // that it did not insert.
                            Log.d(TAG, "Failed to delete today's step count data");
my Silhouette's profile photoGustavo Moura's profile photo
The problem with the snippet above is that you're both trying to delete a specific data type and trying to deleteAllData (which deletes all data types).

So if you're trying to just delete steps, what you want to do is remove the "deleteAllData()" line from the method.  That line would cause it to delete all data written by your app during the time period.
Add a comment...

Fabian Eichinger

Bug Reports  - 
Hey there,
I think I stumbled upon a bug in Google Play Services for Android. As there is no easy-to-find public bug tracker for it and my project is using Google Fit I hope you can help me / forward it to the right team.

GoogleApiClient.blockingConnect() is not returning the same error code or resolution in its ConnectionResolution as the ones provided to an OnConnectionFailedListener.

This code:

final HandlerThread bcThread = new HandlerThread("blockingConnectThread");
final Handler bcHandler = new Handler(bcThread.getLooper());

final HandlerThread cbThread = new HandlerThread("callbackThread");
final Handler cbHandler = new Handler(cbThread.getLooper());

final GoogleApiClient apiClient = new GoogleApiClient.Builder(ctx)
        .addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {
            public void onConnectionFailed(ConnectionResult connectionResult) {
                Log.d(Thread.currentThread().getName(), connectionResult.toString());
        }).build(); Runnable() {
    public void run() {
        ConnectionResult blockingResult = apiClient.blockingConnect();
        Log.d(Thread.currentThread().getName(), blockingResult.toString());


D/callbackThread﹕ ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{840be62: android.os.BinderProxy@1f5f1bf3}}
D/blockingConnectThread﹕ ConnectionResult{statusCode=CANCELED, resolution=null}

if there is no account connected to the app yet.
Blocking connect returns the same ConnectionResult without an connection failed listener as well.
When a sign in already happened before, blockingConnect() works fine.
Gustavo Moura's profile photoFabian Eichinger's profile photo
Hey Gustavo,

I put together a small Android Studio project:

I created a Client ID in a fresh project in the Google Developers Console. It yields the same log as in my OP on both my Nexus 5 (LMY47D, Play Service v7.3.29) and 2013 Nexus 7 (LMY47O, Play service v7.3.29).
Add a comment...

Right now i can get heart beat minute value using the API's for Heart Rate sensor  on my LG G Watch R.  PPG sensor is used to get the Heart Rate Monitor work.  I wanted to know if Google fit in any ways allow developers to access raw PPG sensor values form the hardware? 
Andrew Roberts's profile photo
Not unless LG have created a custom data type, and are pushing the data. 
Add a comment...

Dwight Jones

Discussion  - 
Here's a good question....

When looking at the heart rate graph on Google Fit, why does it go by the low number and NOT by the average or even the high?

I personally think its silly.

Add a comment...

About this community

The Google Fit Developers group is a community for motivated developers who are interested in testing our pre-released Fitness APIs. Here, you can post questions, comments, or just your general enthusiasm for Google Fit!
What is Activity Type 108?  I've seen it start popping up in the last few weeks, but I don't see it listed on .  Please let me know.  Thanks!
Eric Y. Theriault's profile photoGouri Joshi's profile photo
You're right 108 is OTHER. However, we expect Apps to use "Other" only if it is to indicate some fitness activity which is not listed in the activity type values.
Do you what kind of data/activity is this app reporting?
"Unknown" gives no indication as to what the user is doing, while "other" indicates that the user is performing a fitness-related activity. It is up to the developer to pick the most appropriate activity type.
Add a comment...

Sumeet Anand

Bug Reports  - 
There seems to be an issue related to extending permission of existing GoogleFit connected user. Suppose user has already granted permission to FITNESS_ACTIVITY_READ_WRITE scope & later on developer thinks of adding FITNESS_BODY_READ_WRITE scope.  In that case, instead of asking user to give permission, it is throwing following error: 
Connection failed. Cause: ConnectionResult{statusCode=unknown status code 5000, resolution=PendingIntent{41d58270: android.os.BinderProxy@423f35f0}}

+[Gustavo Moura], Can you please confirm this issue ? 
Satinder Singh's profile photoSumeet Anand's profile photo
Ah, Got it. Thanks +Satinder Singh  . My misunderstanding. 
Add a comment...

Chris Anderson

Discussion  - 
Anybody tried the new readDailyTotal() method now included in Google Play Services 7.3 for getting a step count? Can anyone shed some light as to why when I execute this method in my watch face service I get 3531 steps, when I execute from my phone companion app I get 4124 steps and the google fit app on phone and watch say I have 4924 steps?
Gustavo Moura's profile photo
Hi Chris,

The Wear is showing only data from the watch, the phone is showing combined data. That's what I think is going on.

Regarding the Fit app, it uses a special data source called "estimated steps". There are several posts in the community that explain how to use it. Let me know if you can't find it 
Add a comment...
Hey i wanted to get the TYPE_BODY_FAT_PERCENTAGE and the TYPE_BASAL_METABOLIC_RATE after i inserted the weight and height in Google fit but i didn't get any return for that is there a problem with algorithm calculation or i m missing something else except weight and height
Thank You previously.
Gustavo Moura's profile photoMohamed Hedi Hassine's profile photo
Thank you +Gustavo Moura  for your answer and i hope we can get calories expended se we can make a perfect sessions in android and BMR would be Great to give advices for our app users.
Thank you 
Add a comment...
Done a lot of searching and come up with nothing so trying here... I wanted to use the REST api to retrieve step count info recorded by my device but when I list datasources ( GET from my web app I don't see any data sources. When I open the Fit app on my phone I see various different recordings. Am I missing something basic here? Any pointers greatly appreciated.
Michel Edighoffer's profile photo
The problem, I think, was the around the timestamp.
Add a comment...

Hoang Nguyen

Bug Reports  - 
We've noticed some data problem with our user regarding pruned_distance. The user connect RunKeeper and Strava to Fit. On our side, we're able to detect biking activity; however, distance data (we're using pruned_distance) is empty. We also try other data sources but no luck as well. What can be the cause for such error ?
Gustavo Moura's profile photonavnit ranjan's profile photo
I have reported same via fit feedback. hope this get fixed soon.
Add a comment...

Arno Zijlstra

Bug Reports  - 
Is Google Fit compatible with the HTC M8 yet? The app says no but some people say yes.

Phone is running Android 5.0.1 and I've just reinstalled the Fit app.

My son has a HTC M8 mini and it works on his phone.

If not, are there any short-term plans to make it work?
Arno Zijlstra's profile photoRyan Steckler's profile photo
Rooted 5.02
Add a comment...
Any word yet on a fix for Google Fit for the Galaxy S6?
Gustavo Moura's profile photoSteven Shillingford's profile photo
+Gustavo Moura​ awesome, you just made my day. Thanks 
Add a comment...
Is it possible to have Google Fit client and Google Plus client built in the same service ? I mean, having 2 buttons in an activity, one handling fit connection and the other one handling Plus connection. Both of them using same methods in the service except for built the client ?

Thanks a lot !
Nick Felker's profile photomy Silhouette's profile photo
Thanks Nick, I will try to implement it this week.
Add a comment...
Check out our Grand Prize Winning app Instant on Google Play:

Looking forward to your feedback :)
Quantified Self - Instant is a lifestyle app, automatically tracks the dail...
Add a comment...