I hope you can help me...the thing is that I'm getting all the samplepoints from the Health kit API and it's working fine except for the protein value it shows always 0, I've checked the Huawei Health App and over there is showing correctly a value from protein, the device used is a Matepad T8, this is the short answer from the endpoint
{"samplePoints":{
"com.huawei.instantaneus.body_weight":{"startTime":1640210232971000000,"endTime":1640210232971000000:, "dataTypeName":"com.huawei.instantaneous.body_weight","originalDataCollectorId":"raw:com.huawei.instantaneous.body_weight:com.huawei.health:HUAWEI:HUAWEI Body Fat Scale:5C:CA:D3:08:07:C2:168969165","value":[{"fieldName":"body_weight","floatValue":81.80000305175781},{"fieldName":protein_rate"},{....}]}}}
This is the Health App if you see there is protein data
and in the app Im developing shows 0 because the endpoint is giving 0 value, this is from the Matepad T8
Update
May i confirm what is your countries/regions? The protein rate is calculated only when the following three fields are met when the REST interface queries the body weight. Docs link.
so to locate this issue, please provide the complete data returned by the REST API.
Could you pls check whether the conditions are met according to the document?
Also please check whether the data source is from Huawei's body fat scale. According to this docs, protein and other data are measured by body fat.
And it would be great if you could provide us with a picture of the weight parameter data displayed in your HealthApp for us to locate the problem.
Related
I have added GTM and GA4 to some website apps to produce tables of detailed stats on click-throughs of ads per advertiser for a date range. I now have suitable reports working successfully using Data Studio, but my attempts to do the same using the PHP implementation of Analytics Data API V1 Beta (in order to do batch runs covering many date ranges) repeatedly hit a brick wall: the methods needed to analyse the response from instantiating BetaAnalyticsDataClient and then invoking runPivotReport or batchRunReports or batchRunPivotReports (and so on) appear not be specified.
The only example that I could work from is the ‘quickstart’ one that does a basic dimension and metric retrieval, and even this employs:
getRows()
getDimensionValues()
getValue()
getMetricValues
that do not appear in the API documentation, at least that I can find.
The JSON response format for each report is of course documented: for example the output from running runPivotReport is documented as an instantiation of runPivotReportResponse.
But nowhere can I find a specification of the methods to be used to traverse the JSON tree (vide getDimensionValues() above) and extract some output data.
Guesswork has taken me part way, but purely for example, when retrieving pivot data, should a
getPivotDimensionHeaders()[0]
be followed by a
getDimensionValues()
or a
getPivotDimensionValues()
I am obviously approaching this all wrong, but what should I do, please?
Within MKDirections I am looking for a route that does not comprise any step with a ferry in it. Using the MKDirectionsTransportType at this stage isn't helpful as the ferry can be a single step in an overall route that would not be identified at an overall route level. As a result I am looking at the transport type for each step MKRoute.Step. However, it does not look like Apple is properly reporting a step that is clearly a ferry as a transport type that is not an automobile. Printing out instructions for each step I get the following for a given step: "Take the “Washington State Ferry” ferry" Clearly this step is using something other than an automobile and from the list of transport type options I would have assumed transit but again it's actually returning automobile.
Has anyone dealt with this prior and is there another reliable way to be able to detect and eliminate something like a ferry? I am hesitant to use the string and simply search for "ferry" as that could be inconsistent and might be the name of a legitimate road, etc. Not clear why Apple is not identifying a ferry properly which is also happening with other ferries - the Long Island Ferry - as an example.
I am using the REST API of HERE. I am trying to obtain the traffic signs corresponding to a set of LINK_IDS.
I have a list of the links (unique IDs) I am interested in, however I do not know how to obtain the traffic signs which are found in these links. As I understand there should only be 1 traffic sign in each link, at the end of the link.
Can anyone hint what is the way to proceed? I was trying to use Platform Data Extension API to do this, but have not been successful.
The most I have been able to achieve is obtaining all the traffic signs in one tile, by querying the following:
http://pde.cit.api.here.com/1/tile.json?region=EU
&release=LATEST
&layer=TRAFFIC_SIGN_FC1
&level=9
&tilex=537&tiley=399
&app_id={APP_ID}&app_code={APP_CODE}
However, this is not even working for all locations. I tried in different parts of the city of London and the output I obtain is:
{
"Rows":
Array[0][
]
}
In summary, my goal is to obtain the corresponding traffic sign (s) in a link. That is, for link with ID XXXXXXXXX I would like to see which is the traffic sign present in the location marked by this link.
I am trying to obtain the traffic signs corresponding to a set of LINK_IDS
There is no straight solution to this yet. You have to use PDE layer which gets all traffic information for a tile and then extract the link ids of your interest. We have 100% coverage in WEU and NA. For MEA, we have 100% coverage on FC1-FC4 roads and less coverage on FC5 roads(which are destination roads).
This unstructured format
http://dev.virtualearth.net/REST/v1/Locations?addressLine=3712%20Adelaide&adminDistrict=TX&locality=The%20Colony&countryRegion=US&postalCode=75056&maxRes=1&key=YourKey
does not seem to return the same result as this structured format
http://dev.virtualearth.net/REST/v1/Locations/US/TX/75056/The%20Colony/3712%20Adelaide?o=json&key=YourKey
The structured format is returning high confidence and the unstructured format is returning medium. What am I missing?
Edit: I never would have expected this. I have discovered the unstructured format returns medium confidence with my current API key and returns high confidence with a new trial key. What does this mean?
Trying the URL's you provided I see the exact same results with the same high confidence value.
Here is the response from the Microsoft Bing Team:
Issue Definition: Question regarding Bing Maps REST Location API service. Scope Agreement: As per our communication, you provided a query for 3712 Adelaide, The Colony, TX 75056 with the Bing Maps REST Location API with a Basic and Enterprise key and received different results and you would like to know the reason. The reason you are receiving different results is because we are in the middle of deploying new information to the Bing Maps REST geocoder. This information is first flighted on Basic (free) accounts before it is released to Enterprise customers.
Our Product Group let us know that it should be deployed to all Enterprise customers by the end of this month.
I am able to read the barocode but i am confused about how to get the food product value from the barcode value .
Do we need to call a webservice or create a database locally ...
help me out
thanks in advance
Have a look at OpenFoodFacts. It's a database that does just that, with ingredients, calories, etc. It's based on the barcode.
Product bar-codes contain almost no product related information - they are mere unique identifiers. The system used in Europe - EAN13 - consists of a country code, a manufacturer code, a product code, and a check digit. To translate any of this data into usable information you need a database or web-service.
I know this was asked a long time ago but I figured I would give an update for anyone looking now... We use an API called upcFood (www.upcfood.com) They offer a simple API that allows lookup of food products directly from the barcode. upcFood includes nutrition data, Products Data, allergy data, ingredients etc. from a single search.
In case anyone else is looking for this info in 2021, you can get this data directly from the USDA's Food Data Central API, which is public domain. One of their endpoints has a query param, which supports keywords and, as a little tinkering revealed, UPCs! For instance, here's a query for a snack I had laying around:
https://api.nal.usda.gov/fdc/v1/foods/search?query=850126007120&pageSize=10&api_key=DEMO_KEY
API keys can be had with an email address. Hope this is useful to someone!
Free database here:
http://www.upcdatabase.com
and here:
http://www.yoopsie.com/
Otherwise just Google for "upc database" and you'll find people offering to sell you one.
I doubt that the databases will include prices since those are for the individual retailers to set.
I am not sure if you still need the information since it is dated a year..
A french startup has created an application that can find most of the correspondant of ean-code to food product. It provides as well an API for developper to integrate in their application.
You can check it at : http://prixing.fr/api
Since it is based in France, it is in French language .. if it is useful, I hope it can help