Skip to content Skip to sidebar Skip to footer

How To Get Heart Rate Values From Google Fit History?

I need to get all the heart rate measurements, and not the minimum, maximum and average, which is what I have been able to get. This is the code I use for reading from my java clas

Solution 1:

I'm answering my own question.

In order to obtain all the datapoints of the readings made with Google Fit Api, the object DataRsult to build would be as follows:

finalDataReadRequestreadRequest=newDataReadRequest.Builder()
.read(DataType.TYPE_STEP_COUNT_DELTA)
.read(DataType.TYPE_HEART_RATE_BPM)
.enableServerQueries()
.setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
.build();

It would return all datapoints within the specified range.

Post a Comment for "How To Get Heart Rate Values From Google Fit History?"