Health data (HealthKit and Health Connect)
Reads and writes health records such as steps, heart rate and sleep, one data type at a time.
In one line
Can see and add health data such as steps and sleep, one type at a time
Reads and writes health records such as steps, heart rate and sleep, one data type at a time.
Sleep, heart rate and cycle data show conditions and habits. Both OSes grant per data type.
What it can and can't do
What the user does: You tap Connect health data and switch on the types you want to share
It can
- See the data types you allow, such as steps, heart rate and sleep
- Add new records for the types you allow
- Use background access on Android with a separate permission
- Check older history on Android with the history permission
It cannot
- See types you left off in the sheet
- See more than the last 30 days on Android before first grant, without the history permission
- Tell on iPhone if you denied; it looks like no data
- Keep access after you turn the switches off
How it differs between platforms: Android Health Connect limits old data to 30 days unless you allow history. iPhone HealthKit hides a denial.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Supported |
| First version | Android 14 (API 34) | iOS 8 |
| Permission or entitlement | android.permission.health.READ_* and WRITE_* per data type; READ_HEALTH_DATA_IN_BACKGROUND; READ_HEALTH_DATA_HISTORY | NSHealthShareUsageDescription, NSHealthUpdateUsageDescription, HealthKit capability |
| Protection level | dangerous | prompt |
| How access is granted | prompt | prompt |
| What the user sees | Health Connect permission sheet with per type toggles | Health access sheet with per type toggles |
| How long it lasts | Until revoked; permission usage visible in Health Connect | Until revoked |
| How to take it back | Settings > Health Connect | Health app > Sharing > Apps |
| Store policy | Play: Health apps declaration; health data not for ads | App Review 5.1.3: no use for advertising or storing in iCloud |
| API | HealthConnectClient | HKHealthStore.requestAuthorization |
| Notes | Reads default to 30 days before first grant; older data needs READ_HEALTH_DATA_HISTORY | Apps cannot tell if read access was denied; denial looks like no data |
Data you get
What comes back: Samples by type
Shape: list
How often: queries and observers
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
types | list | HK types | hundreds | Not listed |
history | integer | days | 30 default on Health Connect | Not listed |
Technical limits
- Read denial is hidden on iOS
- Health Connect history window limited by default
The story
What it is
Lets an app read and write health records such as steps, heart rate and sleep.
For you
A screen lists each kind of data an app wants, like steps, sleep or heart rate. You turn on only the ones you like, and you can change it later in the Health app.
For makers
Makers use it to read your history, write new workouts and connect with watches and other apps. It saves them from building their own sensors and gives users clear controls.
Where you see it
| Type | Example | Apps |
|---|---|---|
| fitness | A workout app reads your steps and writes a new run so the Health app has it. | None named |
| health | A sleep app reads your nights and shows trends. | None named |
| health | A period tracking app writes cycle data and reads symptoms. | None named |
| wearables | A watch app shares heart rate and activity with the phone. | Apple Watch |
| games | A game gives rewards for steps you walked. | None named |
| health | A diabetes app reads glucose from a sensor. | None named |
| ads | Apple bans using HealthKit data for ads or selling it. | None named |
Risks
- Reveals conditions and habits
- Shared data can leak
Android and iPhone in short
- Android: Android uses Health Connect with its own list of per data permissions.
- iPhone: Granted per data type, with a bundled read and write choice in a single sheet.
What the platform says
- Apple: HealthKit. Developer pitch: a central place for health data, with people in control of what each app can see and write.
Good uses and abuse
Legitimate uses
- Fitness apps
- Telehealth
Known abuse
- Insurance profiling
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 5 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2014-09, iPhone iOS 8: HealthKit introduced
- 2023-10, Android 14 (API 34): Health Connect built into the platform
Related capabilities
Related
- Clinical health records (FHIR). Can see your medical records, such as conditions and allergies, if you share them
- Motion and fitness activity. Can see your steps and whether you walk, run, drive or cycle, after you allow
Sources
How well checked: Based on official documentation.