A wearable integration is a contract about data access, identity and time. Start by specifying which observation the product needs, how recently it must have been measured and who is allowed to use it. Choosing an SDK before answering those questions can produce a connected dashboard that still cannot explain its numbers.
Choose the access path for the actual workflow
An on-device mobile integration and a server-side vendor API have different access and operating requirements. HealthKit and Health Connect do not mean that a backend can silently read every device a person owns. Map the user’s permission flow, the source platform and the path into your own service before promising a device list.
| Feature | Data and freshness question | Failure state to design |
|---|---|---|
| Daily activity view | Which reporting day and aggregation policy define the total? | No readings or overlapping source records |
| Coach review | Which observations did the client share with this coach? | The relationship ends after data was imported |
| Recovery explanation | Which inputs and baseline are sufficient for a calculation? | A required observation is missing or stale |
Keep permission state separate from measurement state
On Apple platforms, HealthKit deliberately does not reveal whether read permission was denied. An empty query therefore cannot reliably become “you denied access.” Use neutral copy such as “No recent readings available,” with an appropriate route to connection settings. Health Connect has its own permission lifecycle; do not reuse an iOS assumption as an Android API contract.
Apple: authorizing access to health data
Preserve enough provenance to reconcile a record
Keep source identity, observation interval, original unit, import time and the transformation used for display. Separate repeat delivery of the same record from overlapping observations written by different sources. The first is a synchronization-identity problem; the second needs a metric-specific aggregation policy. Do not simply sum phone and watch totals or merge every pair of matching timestamps.
Health Connect duplicate records and aggregation rules
An implementation lesson from UltraFit360
In the reviewed UltraFit360 health-sync service, local storage, display-value conversion, query invalidation and backend synchronization are separate steps. The backend call has an error path that retains locally saved data. This makes a useful design distinction: “saved on this device” and “available to a coach through the backend” are different states. Source inspection does not establish that every device and failure case has passed production testing.
Make disconnect and deletion part of acceptance
- Revoke one record permission and verify the rest of the app remains usable.
- Repeat an import after an interrupted connection and check record identity.
- Disconnect a source and state what happens to previously imported records.
- Delete or correct an upstream record and verify the chosen propagation policy.
- Travel across a timezone boundary and inspect the reporting-day rules.
Health Connect: synchronizing records and changes
Scope HealthKit and Health Connect integration work
Does an empty HealthKit result prove permission was denied?
No. HealthKit does not reveal the user’s read-permission decision. Design an empty or unavailable-reading state without claiming to know the cause.
Should phone and watch step totals be added together?
Not automatically. They can cover overlapping activity. Use the platform’s supported aggregation behavior and a documented policy for the metric and source.
