Document DB v7.2: Temporal Support, Telemetry Collection, All Calculations, String Based APIs, & Orleans Storage Providers! Feed The Machine Here
Platform Notes
- HealthKit requires a real device (not simulator) for most data types
RequestPermissionson iOS does NOT tell you if the user denied access (Apple privacy policy) — it may returntrueeven when denied- Percentage values (body fat, O2 saturation) are returned as 0–100, not 0–1
- Your app requires a provisioning profile with HealthKit capabilities enabled
ObserveusesHKAnchoredObjectQueryfor push-based real-time delivery — no polling needed- Menstruation flow uses
HKCategoryType.MenstrualFlow; theMenstruationFlowResult.IsCycleStartflag maps to theHKMetadataKeyMenstrualCycleStartsample metadata, and theMenstrualFlow.Nonelevel is supported - Heart rate variability uses
HKQuantityTypeIdentifier.HeartRateVariabilitySDNN(SDNN, in ms) Speedmaps toWalkingSpeedandPowermaps toCyclingPower(HealthKit has no generic speed/power types)- Workouts use
HKWorkoutwithWorkoutTypemapped toHKWorkoutActivityType; nutrition is written as anHKCorrelationof typeFoodcontaining the individual dietary quantity samples - Sexual activity protection is stored via the
HKMetadataKeySexualActivityProtectionUsedmetadata key
Android
Section titled “Android”- The Health Connect app must be installed on the device
- Minimum SDK version must be 28 (Android 9) or higher
- Body fat percentage and oxygen saturation use individual record queries (Health Connect does not provide aggregate metrics for these types)
Observeuses Health Connect change tokens with polling (default 5 seconds) — Health Connect does not support push-based observation- Menstruation flow uses the
MenstruationFlowRecordwith theandroid.permission.health.READ_MENSTRUATION/WRITE_MENSTRUATIONpermissions. There is noNoneflow value (written asUnspecified), andIsCycleStartis ignored — Health Connect models the period span as a separateMenstruationPeriodRecord - Heart rate variability uses
HeartRateVariabilityRmssdRecord(RMSSD, in ms) — a different computation than iOS’s SDNN, so the values are not directly comparable - Each new type needs its own permission, e.g.
READ_BLOOD_GLUCOSE,READ_VO2_MAX,READ_EXERCISE(workouts),READ_NUTRITION,READ_SEXUAL_ACTIVITY(and theWRITE_…equivalents) — declare them inAndroidManifest.xml - Instantaneous records without aggregate metrics (blood glucose, body/basal temperature, respiratory rate, VO2 max, HRV, lean body mass) are read with
ReadRecordsand bucketed in-memory, like body fat and oxygen saturation - Workouts use
ExerciseSessionRecord; itsWorkoutResultenergy and distance arenullon read because Health Connect stores those as separateActiveCaloriesBurnedRecord/DistanceRecordentries BasalEnergyBurnedis derived fromBasalMetabolicRateRecord(a rate); on write the value is treated as kcal/day