【问题标题】:Is it possible to get Google Fit API sensor data without Google Fit App installed?是否可以在未安装 Google Fit App 的情况下获取 Google Fit API 传感器数据?
【发布时间】:2015-08-07 16:34:33
【问题描述】:

我正在尝试制作一个 Android 应用来使用 Google Fit API 计算步数。我能做的是从传感器获取步数,但只能安装 Google Fit 应用程序。如果设备上未安装 Google Fit 应用程序,我的应用程序不会从传感器接收任何数据。这是故意的(为了从需要安装应用的 Google Fit API 传感器获取数据)还是我做错了什么?

【问题讨论】:

  • 没有。您无需安装 google fit 应用程序即可从 google fit 传感器 api 获取步数数据。你可能采取了错误的方式。
  • 是的,我知道得到它,但我不知道我之前做错了什么,它没有检测到步骤。
  • 怎么做的。需要指导。如果安装了 GoogleFit 应用程序,我只会得到一步。

标签: android google-fit


【解决方案1】:

是的,可以获取 Google Fit API 传感器数据。

您应该使用 Google Fit Recording API 来使用 Sensors API,而无需安装 Google Fit 应用程序。

https://developers.google.com/fit/android/record

接下来是一般要点 - 您的应用程序应订阅某些数据类型以在未安装 Google Fit 应用程序的情况下收集数据。在安装了 Google Fit 应用的情况下,您不需要使用录制 API,因为 Google Fit 应用已经使用它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多