I'm writing native code for getting the heart rate samples using react-native-google-fit I've tried aggregate method but it returns the average and not the resting heart rate.If I use the default read function I'll have all heart rate samples in given duration but don't know how to get resting heart rate or how to calculate it from the heart rate samples. Is there is formula to calculate it from the all samples?
DataReadRequest.Builder readRequestBuilder = new DataReadRequest.Builder()
.read(this.dataType)
.setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS);