Is there a better way to get WatchKit up to date heart rate data

15 Views Asked by At

I am writing a watch app that allows for tracking of tennis match scoring and creates a kind of mixed tennis/biometric audit trail of what happened when. Nothing spectacular, just a bit of a fun project.

In the app, while I do give the option of starting a work out and tracking pertinent data and embedding it in a stream of scoring updates, I don't REQUIRE that a working be started. This limits the data available and that's fine.

However, I still do want to allow the user to track heartbeat and blood oxygen saturation by swiping over to a special controller that allows the user to press on a button to get an instant update. Well the problem with this idea is that the data fetched is not always up to date and I wanted the data as of now, just like the Apple default heart rate app does when you press the button.

It seemed that the only way to force the health store to be updated was to start a workout, get a notification that an update was made, wait a second or so, then fetch the most recent heart rate data, then kill the workout. I mean it WORKS but yikes.

Does anyone out there have a better way of doing this? Starting up a workout then ending it and then probably deleting it (if I need to do that) seems kind of overkill. Any ideas would be helpful. Thanks in advance.

0

There are 0 best solutions below