0

我正在尝试通过 REST 创建温度数据源,但它一直失败:

Data type does not match well-known data type with the same name

我发送的数据是:

{"application":{...Same as other working samples....},"dataType":{"field":[{"name":"body_temperature","format":"floatPoint"},{"name":"measurement_location","format":"integer","optional":true}],"name":"com.google.body.temperature"},"name":"Temperature Feed","type":"raw","dataStreamId":"raw:com.google.body.temperature:XXX"}

根据https://developers.google.com/fit/datatypes/health#body_temperature,我没有看到任何不应该工作的原因 - 我做错了什么?温度需要特别许可吗?

谢谢。

埃里克

4

1 回答 1

0

问题是 REST 请求中的 measure_location 必须是 body_temperature_measurement_location。更改后,它现在可以工作了。

于 2020-10-20T06:05:33.347 回答