一段时间以来,我能够从REST API提取步骤数。但是现在,API返回的汇总数据要持续到4月23日为止的几天。其余数据点为空。
自该日期以来,Google Fit应用未显示0个步骤。
我正在使用此请求来获取数据:
{
"aggregateBy": [{
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps"
}],
"bucketByTime": { "durationMillis": 86400000 },
"startTimeMillis": 1552431600000,
"endTimeMillis": 1558452400998
}
我尝试使用dataTypeName
代替dataSourceId
。我也尝试使用这两个参数。
部分回复
{
"startTimeMillis": "1555974000000",
"endTimeMillis": "1556060400000",
"dataset": [
{
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:aggregated",
"point": [
{
"startTimeNanos": "1555999678474000000",
"endTimeNanos": "1556022262848000000",
"dataTypeName": "com.google.step_count.delta",
"originDataSourceId": "raw:com.google.step_count.cumulative:HUAWEI:COR-L29:2c96eb83addb8d3e:step counter",
"value": [
{
"intVal": 3003,
"mapVal": []
}
]
}
]
}
]
},
{
"startTimeMillis": "1556060400000",
"endTimeMillis": "1556146800000",
"dataset": [
{
"dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:aggregated",
"point": [] // EMPTY DATA POINTS SINCE THIS DATE
}
]
}