python - Google Fit 位置数据源
问题描述
在我的网络应用程序(python)中,我获得了用户使用“https://www.googleapis.com/auth/fitness.location.read”范围的许可。我应该使用什么数据源从 google fit 获取历史位置数据?
例如,我的步骤数据源如下所示: STEPS_DATASOURCE = "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps"
我认为我需要的数据源的开头应该看起来像这样“派生:com.google.location......
解决方案
这是derived:com.google.location.sample
此数据类型捕获用户的位置。因为每个数据点代表用户在读取时的位置,所以只需要设置结束时间。这将用作读取的时间戳。
但请注意
此数据只能由写入数据的应用程序读取。您的应用程序只能读回它写入的数据。它无法读取其他应用程序写入的位置样本数据。
来源https://developers.google.com/fit/datatypes/location#location_sample
推荐阅读
- c# - 在 WPF MVVM 中更改 ComboBox 选定项的文本颜色
- sql - SQL:检查列是否包含来自另一个 SELECT 语句的值
- node.js - eslint 为 2 个文件夹配置相同,但 linting 不同
- c++ - Vector中数字常量之前的预期标识符
- java - 将不同布局中的 textView 设置为 EditText 的值
- django - 如何在 django 中访问多对多模型字段
- erlang - 之前的 Erlang 语法错误:第 55 行中的 'end'
- javascript - Chart.js,未捕获类型错误:无法设置未定义的属性“0”
- c - C语言中的MPI数据广播与否
- python - 在 Python 中,为什么 GraphQL 枚举值显示为 null?