0

I'm trying to query Google Fit Android API, in order to get a list of a user's activities in a time period WITH the related values per activity (e.g. step count for WALKING, meters for CYCLING, etc). The closest any answer comes to my requirement is https://stackoverflow.com/a/27174052/1847976

So my current query looks something like this:

DataReadRequest readRequest = new DataReadRequest.Builder()
            .read(DataType.TYPE_ACTIVITY_SEGMENT)
            .setTimeRange(today.startTime, today.endTime, TimeUnit.MILLISECONDS)
            .build();

However, the above answer does not have the "value" or unit concerned per activity if applicable. It only lists the start and end times.

Divyansh Goenka
  • 997
  • 2
  • 12
  • 35
  • Can you add any details like: code used, error problem encountered? [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask), [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) Show the community what you have tried. – abielita Nov 12 '18 at 07:45
  • Done, please tell me if satisfactory – Divyansh Goenka Nov 12 '18 at 11:12

1 Answers1

0

Please check carefull here #Data types for instantaneous readings

KunMyt
  • 32
  • 5
  • hi, the answer from the previous post works, however it lacks the value for each activity. In my app, I need that per activity to give the user some information. Due to the vastness of different kinds of activities, it is difficult and not a good experience to query each. Therefore, is there a way to make a query (like the one in the previous post) which list the values beside the activity start and end times? – Divyansh Goenka Nov 08 '18 at 07:19