首页 > 解决方案 > 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......

标签: pythonrestgoogle-fit

解决方案


这是derived:com.google.location.sample

此数据类型捕获用户的位置。因为每个数据点代表用户在读取时的位置,所以只需要设置结束时间。这将用作读取的时间戳。

但请注意

此数据只能由写入数据的应用程序读取。您的应用程序只能读回它写入的数据。它无法读取其他应用程序写入的位置样本数据。

来源https://developers.google.com/fit/datatypes/location#location_sample


推荐阅读