Join the community to learn about and discuss the Google Fit SDK.
See all
Members (3,760)
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
abbey west's profile photo
Abraham Williams's profile photo
Aby Abraham's profile photo
100001091057100001 1's profile photo
Aaron Stoertz's profile photo
Adam Blakey's profile photo
Achmad Syachruni's profile photo
Achim Schumacher's profile photo
Aaron Rietschlin's profile photo
Abhik Bhattacharya's profile photo
Aan Olix's profile photo
ada koda's profile photo
Aaron Gillespie's profile photo
Abhijith C's profile photo
Abhijeet Kulkarni's profile photo

Stream

Join this community to post or comment
 
Hello everyone

So I'm playing around with the Fit Rest API, checking out the data it can provide me. Unfortunately for me I don't have a varied data set for sampling the different end points (i.e. I have sleep data, but no heart rate) This may be a huge stretch considering it's oauth, but is there such a sample data set i could request? If not is there any good tutorial that pulls the data and takes screenshots of the JSON objects. Any type of visualization with "real" data (even from a demo run) would help
1
Add a comment...
 
Hi all,

I have decided to open new post here and it would be nice to have some response also from Google Fit dev guys. I have seen many posts with same  issue but their solutions  do not work as I expected. What I'm trying to do is to get daily steps count from each activity but results from my app are different comparing to Google Fit app (especially for running activitiy because my app shows always approx 50% more steps then Google Fit app). The snipped code in the pic shows my way how to try to get steps. Any help or a sample code would be appreciate. Tnx in advance
1
Mladen Babic's profile photo
3 comments
 
Ah, I think that I got it  what you mean by default step stream.
I've got same total steps count from both apps with this part of code:
https://goo.gl/photos/uHYGEf9FA9UNRi5A8
Add a comment...

Manish Sahai

Bug Reports  - 
 
Recorded a treadmill run in Runtastic, which is connected to my Google Fit, and nothing shows up in my Google Fit for that activity. No steps, no kilometres, no calories, nothing. MyFitnessPal (which is also connected to Runtastic) pulls the data perfectly fine. 
1
Giampaolo Frello's profile photo
 
Did a session yesterday with no problem although with GPS. I wonder if it can make the difference. Let me make a test and I'll be back to you
Add a comment...

Hoang Nguyen

Bug Reports  - 
 
Many user on our squad (FitSquad) are able to sync their distance. we're querying pruned_distance via REST API. Please let us know if there's any alternative. Thanks
1
Satinder Singh's profile photo
 
+Hoang Nguyen Just to be clear, your users are having issues with pruned_distance via REST API? Can you send an email to google-fit-bugs@google.com with the following details?
1) Sample test account using your app.
2) Time of query, with time zone.
3) Expected distance data vs observed distance data.
Add a comment...
 
My app suddenly crashes with error connection failed, sign_in_required. I did not changed the environment. Earlier those days it worked. How can I solve this problem?
The credentials in console.developer.com are correct and my app compiles google services. Thank you! 
1
Satinder Singh's profile photoDiana Antohi's profile photo
4 comments
 
Thanks! It was a problem with debug.keystore.
Add a comment...
 
This is what I am building now for Samsung S5 but can't read steps from  within my app. The user registers and gets a consent  screen as illustrated. When it clicks  OK he should see how many steps he walked from last midnight. I use exactly the same code for Samsung 3 and Lenovo and it works perfectly. But in S5 i see nothing. I try like crazy to find a solution,but no solution yet. 
1
Satinder Singh's profile photo
 
+Theodosios Tziomakas Is there any other app or Fit app installed on S5 which is recording steps in Fit, prior to your app? What about the S3 and Lenovo? If your app is the first app to be installed on the phone, and no other app was so far recording steps in Fit, you will not see any historic steps. Fit will start recording steps after there is at least one app recording data.
Add a comment...

Pete Clark

Discussion  - 
 
Another question, is there any way to "subscribe" to activity updates for a given user once he/she has given permission?  This is another feature that is typically provided by other fitness data providers..  At this point for google fit, do we just need to pull at regular intervals?  
1
Satinder Singh's profile photo
 
+Pete Clark Currently we do not have a 'subscribe to data updates' API. Polling at regular intervals is the workaround for now. However, this is one of the top asks from the developers and this feature is there on our radar. Thanks for the feedback.
Add a comment...

Pete Clark

Discussion  - 
 
Hi all.  I am coding a PHP app that will access google fit data via the google fit REST apis, using the google php library.  

Based on the bottom post here, from a google fit engineer (I hope): http://stackoverflow.com/questions/27998823/how-to-get-step-count-from-google-fit-rest-api-like-google-fit-app  ... I am going to simply use this data source to get my steps: "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps" ... we are testing this out with a user on our site and she has 49 (!) data sources to iterate through, yet not one of them contains a simple summary (there's no "merged" data source id in her case).  Unfortunately. :-(

So right now I'm using that data source id above, but it'd be really great if I didn't have to get every data point in minute long intervals. :-) An hour interval would be ideal.    

Honestly this is the first fitness API I've used that doesn't have a simple "give me a summary of calories, duration, steps, distance" on either an hourly or daily interval.  (To be clear, our app interfaces with fitbit, jawbone, movesapp, fitbug... you name it).. and google fit is extremely more complicated than any fitness API I've ever seen, and I don't think in a good way.

I'm available if you'd like more feedback from a 19 year developer well-versed in fitness APIs :-)
1
Bill Strathearn's profile photoPete Clark's profile photo
6 comments
 
Thank you, gents!
Add a comment...
 
I have a class that connects to GoogleFit (GoogleFitService extends IntentService  )and sends me data about movement through
 LocalBroadcastManager.getInstance(this).sendBroadcast(localIntent);
I start service in MainActivity in onCreate : this.startService(mGoogleServiceIntent);
I receive the data in the mainActivity  in onCreate: LocalBroadcastManager.getInstance(FitoActivity.this)
                                        .registerReceiver(bReceiver, new IntentFilter(SERVICE_BROADCAST_ACTION));

How can I update the ui (TextView) every time the sensor sends me data? Thank you very much.
1
Add a comment...

Duncan Jaffrey

Bug Reports  - 
 
Comments might provide more info.
 
The app definitely has some people...

in fits.
Google Fit is, like most things Google publishes on the Play Store, popular by necessity. The fitness and activity tracking service debuted around the time... by David Ruddock in Applications, Polls
29 comments on original post
2
Gustavo Moura's profile photo
 
Thanks +Duncan Jaffrey!   We'll get these issues resolved!
Add a comment...
 
Please DO ADD SLEEP data and the option to export it to other fitness apps. SLEEP AS ANDROID is a great tool for sleep monitoring that even syncs data to fit but this looks like gets burried somewhere in fit and is not even accessible by other fitness apps
6
Aldo van Zeeland's profile photoGustavo Moura's profile photo
2 comments
 
Hi +Lukasz Zyla the data Sleep As Android writes should be available to other apps.

You need to query for TYPE_ACTIVITY_SEGMENT and look for activities such as  FitnessActivities.SLEEP, SLEEP_REM, SLEEP_LIGHT, etc.

I'll pass along the request to add it to the Google Fit app.
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!
 
Nutrition Data help request/possible bug report?

I am using the REST API, trying to access the Google Fit-reported nutrition data recorded with +Lifesum nutrition tracker. 

I am using the following GET request to successfully pull data:
https://www.googleapis.com/fitness/v1/users/me/dataSources/raw:com.google.nutrition:com.sillens.shapeupclub:/datasets/000000-1440845034000000000

However!
The nutrition data contains NO useful information! There are no calories. No fats, carbs, or protein. No food names.

The documentation states that Nutrition Data Type should include
"nutrients (Map<String, float>—calories/grams/IU) meal_type (int—enum) food_item (String—n/a)", but mine only seems to include meal_type.

Is this intended behavior?

The picture is a sample from what I'm seeing. I have verified the startTimeNanos does in fact point to an instance where I recorded dinner, so I know that's working at least.

I would SO BADLY love to be able to access my LifeSum-reported Calories, Fats, Carbs, and Protein. It would automate my now-cumbersome manual quantified self spreadsheet import.
1
Aaron Gillespie's profile photo
19 comments
 
+Gustavo Moura - I forgot I haven't even touched Android Studio since I built my computer. All the environment, all the setup, everything hasn't even been touched. I've got a long way to go before I can even properly start learning this stuff. I'd gladly run an apk you send me on Monday and do what work I can.
Add a comment...

Jason Burke

Announcements  - 
 
 
Blog post from +Android on always on apps for Android Wear. Notice they mention  Endomondo, MapMyRun, and Runtastic, but not Google Fit. 

Hmm......
View original post
1
Add a comment...
 
I'm looking for the integer defines for different fitness activities.

I have found string defines here:
https://developers.google.com/android/reference/com/google/android/gms/fitness/FitnessActivities

But I'm looking for where the corresponding activity types are:
https://developers.google.com/fit/rest/v1/reference/activity-types
1
Andrew Dahm's profile photoGustavo Moura's profile photo
5 comments
 
There is no API with the int values...  we want to standardize on strings so that we can support custom activities in the future.
Add a comment...
 
Hello everyone. I walked some distance today but google fit on Samsung S5 didn't count any steps. It was counting yesterday. Did any of you had this problem as well?
1
Steven Shillingford's profile photoBrian Murphy's profile photo
7 comments
 
This morning I ran a little over 5k steps. When my sw3 synced over wifi I lost 2k of them. When the watch synced over Bluetooth I lost all my recorded steps. My battery also dropped 32% in less than two hours. I wasn't using a gps app on my watch...
Add a comment...
 
Setting Stride Distance
Can you set a stride distance in google fit?
1
Satinder Singh's profile photo
 
+Kurt Smith Thanks for the feedback. We do not have this feature in Fit yet.
Add a comment...

Jason Burke

Discussion  - 
 
 
Yesterday I went for a mountain bike ride. I had Endomondo running along side Google Fit using GPS.  I wanted to do a comparison of the two apps. The image on the left is Endomondo, image on the right is Google Fit.

The distance the two apps measured is very similar. 

Duration and elasped time is a bit out between the two. 

Calories burned is completely different. 

Both have the same settings with reference to height, weight etc. 

I am presuming Endomondo is the most accurate. 
View original post
1
Add a comment...
 
Can someone please tell me how to make google fit sync data from xiaomi mi band (mi fit). I dont want Google fit to count steps along the xiaomi (it says that my htc one m8 is not accurate enough), I just want Mi band data to show in the google fit app. Thanks
2
Matt Sokolinski's profile photoAlexandra Sevostyanova's profile photo
10 comments
 
But if I turn off activity detection of Google fit, it will also turn off the sync, so I won't see if the steps from Mi band are really synced with Google fit? :) Dear +Ke Xiao my steps from Mi band are keep playing tricks on me. well, steps seem to sync (mostly). Like when Mi fit app shows i took 2651 step (I currently look at my stats), Google Fit just showed me 2500 (2500+, i don't remember exactly), then the steps amount dropped to 2315 when I opened Google fit a minute later. And the calorie count is just sick. I feel like I am a bird of some kind, burning, according to Google fit something like 23 active and 67 inactive calories for 24 hours of my normal life. I am almost used to this behavior of these two potentially great, but currently confusing and discouraging apps. This sad situation lasts for quite a long time by now.
Add a comment...
 
What is up with #sync  the last few days... Behavior... I enter in 44 minutes of crosstrainer training. It saves (on the phone) 2 minutes, makes some weard step counts and calories burned assumptions. On the WebPage, nothing (since days there is an extreme delay). Suddenly, on the phone, the entry disappears and is visible again as 11 Minute training with time spent 44 Minutes. 

I already deleted my history a few days ago assuming something went wrong when I started to import sleept tracking data. For me, sync is "kaputt", Google Fit is "kaputt". 

I will once more delete histroy, delete app data, cache, reset watch and all the stuff support surely will ask of me and if this does not help... I don't know... if was a huge plus for buying android and... 

sorry, frustraded as hell..
1
Gustavo Moura's profile photoEric Jain's profile photo
20 comments
 
That's it: If I enable the "activity detection" (even just temporarily), all the missing data is synced.
Add a comment...