Migration guides
Health Connector SDK follows semantic versioning. Major releases contain breaking changes, while minor releases may add replacement APIs and deprecate older ones before the next major release removes them.
v3.10.x → v3.11.0
Platform support is now represented by requirements and resolved against the device snapshot captured by HealthConnector.create().
Replace direct platform-list checks:
// Before
final supported = dataType.supportedHealthPlatforms.contains(
connector.healthPlatform,
);
// After
final status = connector.getSupportStatusFor(
dataType.healthPlatformRequirements,
);
final supported = status.isSupported;Replace exerciseType.isSupportedOnPlatform(connector.healthPlatform) with connector.getSupportStatusFor(exerciseType.healthPlatformRequirements). The old members remain available but deprecated until 4.0.0.
Check a record's dataType, a permission's data type or feature, or ExerciseSessionSegmentEvent.extendedFieldsRequirements for Extension 21 fields. getSupportStatusFor() accepts the requirements list directly.
Use connector.operatingSystemInfo when you need the immutable Android API and SDK Extension snapshot or iOS semantic version.
New public APIs in 3.11.0 include:
HealthDataType.appleStandHourfor reading and sum-aggregating Apple Stand Hour records on HealthKit;ExerciseSessionSegmentEvent.setIndexand.rateOfPerceivedExertionfor Health Connect SDK Extension 21 devices; andExerciseSessionSegmentEvent.extendedFieldsRequirementsfor checking the runtime support shared byweight,setIndex, andrateOfPerceivedExertion.
v2.x.x → v3.0.0
Difficulty: moderate · roughly 30 minutes for a typical app
| Breaking change | What it affects |
|---|---|
| Logging system redesign | HealthConnectorLoggerConfig and log processors replace the previous logging setup |
| API renaming | The largest section — many method and type names changed |
| Health record property types | Properties moved to typed measurement units |
| Meal type unification | One MealType vocabulary across platforms |
| Metadata constructor changes | Metadata.manualEntry() / Metadata.automaticallyRecorded() |
| Exception hierarchy & error handling | Typed exceptions carrying HealthConnectorErrorCode |
New in v3.0.0: the incremental sync API, record sorting, and HealthDataTypeCategory.
v1.x.x → v2.0.0
Difficulty: moderate · roughly 15–30 minutes for a typical app
| Breaking change | What it affects |
|---|---|
| Delete records API redesign | Delete requests are now built from a HealthDataType |
| Read records method rename | Method naming aligned with the rest of the API |
| Error code changes | Codes renamed and regrouped |
| Aggregate response type | Aggregates return typed results |
| Update record return type | Return value simplified |
New in v2.0.0: individual permission status checks, batch updates (Android), activity-specific distance types (iOS), speed data types, and exercise session support.
Upgrading within a major version
Minor and patch releases are backward compatible. Note two version-specific build requirements introduced along the way:
- v3.9.0+ requires
compileSdkExtension 19in your Android Gradle configuration, because it builds against Health Connect 1.2.0-alpha03. See Requirements. ExerciseSessionSegmentEvent.weight,.setIndex, and.rateOfPerceivedExertionrequire the device's Health Connect Mainline module to be at SDK Extension 21, checked at runtime. See Annotations.
The changelog lists every release.