-1

in my web application(python), I got permission from the user to use the 'https://www.googleapis.com/auth/fitness.location.read' scope. What datasource should i use to get historical location data from google fit?

for example my steps datasource look like: STEPS_DATASOURCE = "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps"

I think that the beginning of the datasource I need should look something like this "derived:com.google.location................

1 Answers1

1

It is derived:com.google.location.sample

This data type captures the user's location. Because each data point represents the location of the user at the time of the reading, only the end time should be set. This will be used as the timestamp for the reading.

but note that

This data can only be read by the app that wrote the data. Your app can only read back the data it wrote. It cannot read location sample data written by other apps.

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

Sadderdaze
  • 304
  • 3
  • 14
  • Thank you @Sadderdaze, but i need a little bit more)). I use python to get data from google fit and my full datasource for location should look derived:com.google.location.sample:com.google.android.gms: _and some final word_. What should be at the end? – Kravchenko Evgeny Sep 27 '20 at 13:50
  • i thought this datasource would help me derived:com.google.location.sample:com.google.android.gms:merge_location_sample, but google deprecated 'merge_location_sample' https://stackoverflow.com/a/54004208/7734406 – Kravchenko Evgeny Sep 27 '20 at 14:16