react-native-health
react-native-health copied to clipboard
Question: Can I get the current heart rate without having to wait for the workout to end?
I'm trying to get the current Heart Rate. I'd like to be able to be able to get it every 5 seconds but 20 or 30 seconds would work as well.
I've noticed that when I query the heart rate was only updated every 5-6 minutes. To get around this I started a workout on my watch. "Mind and body" or "other" this increased my heart rate samples to 5 seconds. Only issue is that I can't seem to query these values until I end the workout. If I query during the workout I get the reading from 5-6 minutes ago.. But as soon as I end the workout, I can go back and see my heart rate throughout at 5 second intervals?
Is there a way to get a realtime heart rate?
what my query and options look like:
const options = {
startDate: new Date(2021, 9, 24).toISOString(),
limit: 3,
}
AppleHealthKit.getHeartRateSamples(
options,
(results) => {
@austinGENEreeve did you find a way to overcome this issue?
@gilador No luck.
@austinGENEreeve I know it's been a while since you posted but have you had any luck as I'm interesting in a similar feature for my app? Thanks