Profile cover photo
Profile photo
Eric Y. Theriault
About
Posts

Starting a few weeks ago when the new Google Fit app started rolling out, we started getting a lot of new reports that the data we are posting to Google Fit is not shown either in https://fit.google.com or in the app. We are (unfortunately) used to it now showing in the app for a bit, but the not showing up in https://fit.google.com is new and it is very sporadic. Some users see our data for a few days out of a week, with no pattern as far as I can tell, and furthermore, if we re-read in the data, we see the data. Is anyone else seeing this? Any ideas? Thanks!

I am using the REST API to create nutrition sources and have followed the format described in https://developers.google.com/fit/scenarios/add-nutrition-data ; the feed I create looks like:

{
"application": {
...
},
"dataType": {
"field": [
{
"name": "nutrients",
"format": "map"
},
{
"name": "meal_type",
"format": "integer",
"optional": true
},
{
"name": "food_item",
"format": "string",
"optional": true
}
],
"name": "com.google.nutrition"
},
"name": "...",
"type": "raw",
"dataStreamId": "raw:com.google.nutrition:132640741942"
}

Which I believe is almost exactly the same as the example. Then I put an item in as:

[
{
"endTimeNanos": 1475432860023000000,
"dataTypeName": "com.google.nutrition",
"startTimeNanos": 1475432860023000000,
"value": [
{
"mapVal": [
{
"value": {
"fpVal": 10
},
"key": "fat.total"
},
{
"value": {
"fpVal": 5
},
"key": "sodium"
},
{
"value": {
"fpVal": 5
},
"key": "protein"
},
{
"value": {
"fpVal": 60
},
"key": "carbs.total"
},
{
"value": {
"fpVal": 300
},
"key": "calories"
},
{
"value": {
"fpVal": 36
},
"key": "dietary_fiber"
}
]
},
{
"intVal": 1
},
{
"strVal": "Toast"
}
]
}
]

Which is again, almost identical to what the example is. However, when I read it back in, I get all the proper nutrients data, but the last two fields look like:

{"intVal":1,"mapVal":[]},{"mapVal":[]}

Is there a reason the strVal is being lost? And is there a reason that the mapVal comes back for these two elements?

(Also note that on that documentation above, there is a missing " at the end of '"raw:com.google.nutrition:407408718192:NutritionSource,').

Thanks for any assistance!

What are the data types for com.google.body.fat.percentage? I see it documented in some of the API, but not in the REST Data Types (https://developers.google.com/fit/rest/v1/data-types#data_types) and anything I've done so far has resulted in a 400. Thanks for any insight.

Post has attachment
Photo
Add a comment...

I wrote an application that uses the Google Fit REST API and one of our users says that he does not see the data that I've uploaded into his account.  From our logs, its clear that the data was uploaded and I can read the data back.  Any ideas on why he can't see the data on fit.google.com and the app wouldn't be able to see the data?  (Other users and myself use the service the same way and can.)  Any insight appreciated.  Thanks.

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 https://developers.google.com/fit/rest/v1/reference/activity-types#activity_type_values .  Please let me know.  Thanks!

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?

Post has attachment
When I first created by dataset, I accidentally created it with the name "kg" instead of "weight".  Unfortunately the API doesn't permit me to delete it or update it, deleting all data from Google Fit's database does not appear to delete the data sources, and the real problem is that Google Fit on my phone keeps crashing because of this.  Is there a way to resolve this?

Post has attachment
Just added a bunch of new features to FitnessSyncer, transforming it from just Fitness information to Health and Fitness. Whether you are moving your data from your device to dashboard or tracking your information in the new FitnessSyncer Notebook or viewing the data in our dashboard, I think you health and fitness nuts will love it.

If you've not yet tried it, sign up and let me know what you think. Thanks!
Add a comment...

Post has attachment
Introducing myscenicdrives.com  RoadPreview -- take any scenic drive or road trip through Google Earth!
Add a comment...
Wait while more posts are being loaded