【问题标题】:Unable to get exact steps as shown on Google fit app无法获得 Google fit 应用上显示的确切步骤
【发布时间】:2015-07-03 14:36:40
【问题描述】:

我尝试了 google fit 的 Datasource api 中列出的所有来源。 但是,我无法准确匹配 fit 应用程序上显示的步数。 API返回的响应使用起来很麻烦。可以更具体地说明何时使用哪个 API。另外,我在 15 分钟前走了 91 步。但是,在发出 API 请求后,我仍然无法获取该数据。它只是显示过时的数据。不确定它是否支持实时。我有很好的 wifi 连接,但似乎数据尚未上传到谷歌云。 Fit 应用程序执行 91 步。

以下是我的 api 请求:

GET /fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:estimated_steps/datasets/1429848000000000000-1429906530000000000 HTTP/1.1

结果的总和与今天在 Google Fit 应用上显示的步数不匹配

【问题讨论】:

    标签: google-api google-fit oauth2-playground google-fit-sdk


    【解决方案1】:

    在谷歌文档中。说

    To record fitness data, use the Recording API to create a subscription for each data type you want to record.
    

    使用Fitness.RecordingApi.subscribe 订阅数据。然后使用Fitness.HistoryApi.readDataFitness.HistoryApi.readDailyTotal 阅读。 或者您可以使用 Sensor API 来监控步进变化。

    【讨论】:

    • 我猜历史 API 在 FIT REST API 中不可用
    【解决方案2】:

    我遇到了同样的问题,最后通过这种方式解决了。

    https://developers.google.com/fit/faq#how_do_i_get_the_same_step_count_as_the_google_fit_app

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-07
      • 1970-01-01
      • 2019-12-02
      相关资源
      最近更新 更多