Unity API reference
Namespaces
Section titled “Namespaces”HealthBridgeHealthBridge.DataHealthBridge.Helpers
Primary types
Section titled “Primary types”| Type | Purpose |
|---|---|
HealthBridgeService |
Static provider lifecycle and data operations |
HealthBridgeInitializer |
Platform-aware MonoBehaviour; required in Android players |
IHealthProvider |
Common provider contract |
IWorkoutRouteProvider |
Optional route extension |
IHealthDeleteProvider |
Optional deletion extension |
HealthBridgeSettings |
Permissions, platform text, and editor configuration |
HealthDataTypeRegistry |
Unified type and permission metadata |
HealthBridgeEvents |
Main-thread lifecycle and operation events |
WorkoutImporter |
Workout import and progress workflow |
Service operations
Section titled “Service operations”PrewarmAsyncAutoInitializeAsyncReadDataAsyncWriteDataAsyncWriteWorkoutAsyncDeleteDataAsyncandDeleteWorkoutAsyncGetWorkoutRouteAsyncPublishHeartRateSampleIsReadyandProvider
AutoInitializeAsync supports the editor and iOS; Android players require
HealthBridgeInitializer.
Queries and results
Section titled “Queries and results”Always check Success before consuming results:
HealthDataQueryandHealthDataReadResultHealthDataWriteQueryandHealthDataWriteResultHealthDataDeleteQueryandHealthDataDeleteResultWorkoutRouteReadResultPermissionResult
Read results can succeed with zero samples. Route results can require additional user consent.
Events
Section titled “Events”HealthBridgeEvents exposes provider, permission, workout import, heart-rate,
read, write, and delete lifecycle events. Events are delivered on the Unity main
thread.
Subscribe in OnEnable and unsubscribe in OnDisable.
Capabilities
Section titled “Capabilities”Use HealthBridgeService.Provider.Supports(HealthCapability) before exposing
optional write, delete, route, monitoring, or specialized data UI.
Query defaults
Section titled “Query defaults”HealthDataQuery defaults to seven days and 100 records. Days clamp to 1–90 and
record count to at least one.
Helpers
Section titled “Helpers”WorkoutImporterandImportOptionsExerciseTypeMapperHealthDataTypeRegistry- Typed sample computed date, duration, and unit properties
See data types and units and errors and recovery.
