如果未在设备上安装Google Fit,则数据不会同步

问题描述 投票:0回答:1

我使用的是Google Fit History API。它工作正常,我插入步骤。

// Create a data set
int stepCountDelta = 950;
DataSet dataSet = DataSet.create(dataSource);

// For each data point, specify a start time, end time, and the data value -- in this case,
// the number of new steps.
DataPoint dataPoint =
        dataSet.createDataPoint().setTimeInterval(startTime, endTime, TimeUnit.MILLISECONDS);
dataPoint.getValue(Field.FIELD_STEPS).setInt(stepCountDelta);
dataSet.add(dataPoint);
// [END build_insert_data_request]

现在响应正在恢复成功,但是当我检查Google Fit dashboard时,它没有收到数据,并且数据没有与我的应用程序与Google Fit同步。如何获取同步数据?目前,我们的设备上未安装Google Fit默认应用。

android google-fit
1个回答
0
投票

您必须安装Google Fit默认应用才能同步和接收数据。

您可以按照以下步骤操作:

  1. Google Play Store下载Google Fit到手表。
  2. 在手表上打开Goog​​le健身。
  3. 完成初始设置。

现在,您的手表可用于收集您的健身数据,并会自动同步到Google健身中心。您可以在仪表板中看到您的记录。

您可以查看此blog了解更多详情。

© www.soinside.com 2019 - 2024. All rights reserved.