HealthKit in depth from the perspective of a swimming app
info.activeintime.comWhat this article fails to mention is that Healthkit is still utterly broken.
I linked up a couple of health apps to it, and after MyFitnessPal's first attempt at integration spewed a ton of duplicate data across almost every nutrition category, I had to clean up their mess, and disable most categories. Even their second attempt is broken.
Meanwhile, Healthkit keeps forgetting what I've added to the dashboard, and shows empty graphs saying 'No Data' for categories that do have data, either app generated or manually input.
Clicking Show All Data just brings up an empty page with a busy spinner that never goes away. If the database is corrupt, there's no way to reset it, and I can't just uninstall and reinstall it. Not that I should have to.
When it did have sufficient (manually corrected) data, it failed to use this to estimate BMI and BMR. It's nothing but a dumb, broken database.
Well if you want to "Show all data" you have to be patient. For example it will take a lot of time to load the steps data. Eventually it will display a list item for every 10 secs of activity without any grouping. It looks like a student's first project. I deployed my HKit aware app this week in the app store and there are some problems (HK freezes), but hopefully they 'll sort them out. It's still embarrassing for Apple though..
I wish that were true - but even for show-all-data with one data-point (height, for example), it still fails to load.
And every graph is empty, even ones with manually entered data. If I choose edit->clear all for a data type, it still doesn't recover.
I've been using it for quite a while now (since the betas) and haven't had any issues. The graphs are slow to load sometimes (if you've got it set to months) but apart from that it's been fine.
My only gripe is the weight integration with MyFitnessPal. I track that with Runkeeper which then syncs it to MyFitnessPal. For some reason MyFitnessPal won't then push this to HealthKit so I have to enter it manually.
Yeah, now there is the potential for one buggy app creating bad data to "infect" all your other apps via HealthKit. Like if it doubles up your runs, now your activity calories are wrong in your diet tracker. Yay.
One of the protections there is that if you delete an app from your phone, you've got the option to also delete all of it's data from HealthKit. Still agree it's a pain though when it does happen.
but HK was supposed to fuse data so I would suppose it would remove double entries. I think they should wait a few months before releasing it.
"Apple are making quite a big deal about this. The recorded data is of an incredibly private and personal nature and they’re preventing it from being passed over any kind of network except as part of a secure backup. [...] A more real world case is that hospitals are starting to create out patient monitoring apps. Whenever a patient uses their blood pressure monitor, the hospital app gets notified of the new reading, sends that data to the hospital computers, a doctor might then review it, see there’s a problem and call the patient in."
I don't see how both can be true, and I don't know which I would want. On the one hand, the first is highly desirable, but that second use case makes lots of sense, too.
Reading https://developer.apple.com/app-store/review/guidelines/#hea... I think the first isn't entirely true:
"27.5 Apps that share user data acquired via the HealthKit API with third parties without user consent will be rejected"
So, that's not a blanket forbidden. And likely, they aren't preventing anything. That game with an on screen heart rate indicator could easily encrypt heart rate information and send it alongside other data to a game server. It would be hard to detect that.
Thanks for that - you've caught me being a bit ambiguous. I've corrected it now.
What I was intending to say is that your HealthKit store itself is never transmitted as a whole /except/ as part of an iCloud backup. Apps can of course move individual data points around with the users permission so long as they say so in their privacy agreements.
'The recorded data is of an incredibly private and personal nature and they’re preventing HealthKit stores from being passed over any kind of network except as part of a secure iCloud backup'
> A more real world case is that hospitals are starting to create out patient monitoring apps. Whenever a patient uses their blood pressure monitor, the hospital app gets notified of the new reading, sends that data to the hospital computers, a doctor might then review it, see there’s a problem and call the patient in.
I don't see how doctors could rely on this data. There are so many devices that may use HealthKit, and many of them are (for now) nowhere near as reliable as the equipment doctors would use for the same metrics.
Take blood pressure monitors, for example. If you shop around for a good one for iOS, even the best ones are still questionable, at best. Some people claim they're very accurate, while others say they're way off.
It seems we have a long way to go before doctors could rely on the data from HealthKit devices.
I'd imagine that to begin with medical professionals will only allow this on approved devices (the originating device is stored with the sample). Given that certified devices have to work within defined tolerances, they'd then be able to know roughly how good the data they're dealing with. I guess there's always going to be cases of user error in equipment use, but that's part of what has to be considered when designing such a system.
The data may be wrong but couldn't the trends be useful? For example a heart rate monitor consistently off by -20bpm will still provide an accurate trend on heart rate over a period of time. I guess the problem here is that the data, even if wrong, would have to be consistently wrong by the same amount.
Your example is overly optimistic - if it was consistent like that, you'd just adjust it at the factory or calibrate it later on, and you'd have a perfect instrument. In reality, the data is all over the place, with a large spread. You might still be able to get some kind of weak trend out of it, if you knew the tendencies of that particular equipment. I doubt you could even take long-term averages and rely on them.
Take for instance an elliptical machine I own (it's about 4-5x the price of the cheapest ones, so I guess we can call it "mid-range"). The heart-rate monitor on it is almost worse than useless. Sometimes it will report 200 BPM when I'm not holding the sensors. Sometimes it will under-report for long periods (e.g. reporting < 120 in the middle of a session, where I'm fairly confident my actual heart rate is around 150). I would not recommend relying on these things much.
That said, I think the general idea is not a bad one; we could definitely use more data to analyse. It's just that equipment that gets sold to the public is pretty erratic at the time of writing.
I wonder why these instruments are so hard to get right. I'll be interested to see how well the sensors on the Apple Watch work considering it's essentially the official companion to the Health app. I'd assume that monitoring heart rate form the wrist should be quite accurate but it probably depends on how tight someone has the watch on and the exact position it is on their arm.
This. Trends are far more important for diagnosis than individual results most of the time. Trends in body temperature, blood pressure, blood sugar, etc usually tell a better story than one outlying result.
I have to agree with the "broken" comments. I can't speak to the API, but the Health app sure is a head-scratcher. Those sub-minute steps intervals mentioned by someone else are just baffling from a normal user's perspective. And as far as I can tell, there's no way to answer "How many steps did I walk on Monday?" without breaking out a calculator and adding them up yourself.