health-samples
health-samples copied to clipboard
Min, max, and avg aggregate heart rate and speed stats are always null
I was certain I was doing something wrong (and still could be), but the BPM_AVG
value is always null
even though I'm certain there's data across the time range. I'm using the following code:
val response = healthConnectClient.aggregate(
AggregateRequest(
setOf(HeartRateRecord.BPM_AVG),
TimeRangeFilter.between(activity.start, activity.end)
)
)
val avgBpm = response[HeartRateRecord.BPM_AVG]
avgBpm
is always null
. I checked the sample app and the method readAssociatedSessionData
and the "HR stats (bpm)" and "Speed stats (m/s)" sections are only showing "N/A" even though there is plenty of sample data shown.
Just want to note that this isn't necessarily blocking because I can just read the sample directly and calculate the stats myself...
Thank you, this is a known issue, which will be fixed in the next release.
@deRonbrown Are you able to confirm if you are having this issue still in the latest version of Health Connect?
@deRonbrown Please reach back out if the issue persists!