我们如何为特定用户获取存储在 google fit 云中的数据?我尝试使用 History API,但没有显示任何数据。然后我尝试输入一些数据vai History api,现在我只能通过history api看到这些数据,而不是实际存在的完整数据。
DataReadRequest readRequest = queryFitnessData();
DataReadResult dataReadResult =
Fitness.HistoryApi.readData(mClient, readRequest).await(1, TimeUnit.MINUTES);
数据请求是
DataReadRequest readRequest = new DataReadRequest.Builder()
.aggregate(DataType.TYPE_STEP_COUNT_DELTA, DataType.AGGREGATE_STEP_COUNT_DELTA)
.bucketByTime(1, TimeUnit.DAYS)
.setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
.build();