From the smartphone by using HistoryAPI
If I ask for user's history and DataType.TYPE_HEART_RATE_BPM
for the last past hour, starting from the current time, I miss data from the last half hour.
If I ask them to Google Fit with the same procedure from the smartwatch it's all fine.
So it's not a matter of data fetching because it depends on device.
Maybe it's a problem of synchronization? How do I programmatically force an update of records in the repository of Google Fitness Store?
This is what I'm talking about.
EDIT: this is how I build a request
DataReadRequest readRequest = new DataReadRequest.Builder()
.setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
.enableServerQueries()
.read(dataType)
.build();