Set up Health Connect on Android
Android uses Health Connect and requires HealthBridgeInitializer in the
player.
Add the initializer
Section titled “Add the initializer”- Add
HealthBridgeInitializerto a GameObject in the first relevant scene. - Assign
HealthBridgeSettings. - Enable Initialize On Awake, or call
InitializeAsyncfrom a controlled product flow.
Do not call AutoInitializeAsync as an Android fallback; it returns false by
design.
Configure permissions
Section titled “Configure permissions”Select the minimum read/write types in Project Settings. The Android build processor adds configured Health Connect dependencies and manifest permissions.
In the current SDK, READ_EXERCISE and READ_HEART_RATE are core
initialization permissions. Denying either causes initialization to fail.
Optional denials can degrade individual features while initialization succeeds.
Subscribe to HealthBridgeEvents.OnPermissionsResolved for granted, denied, and
core-permission details.
Verify the generated app
Section titled “Verify the generated app”Inspect the final generated manifest. Health Connect cannot display a runtime permission that is missing from the manifest.
Use a supported Android device with Health Connect installed and current. A missing or outdated provider causes initialization to fail and can open the Health Connect store listing.
Handle partial consent
Section titled “Handle partial consent”- Keep unrelated features usable.
- Disable only operations missing access.
- Explain how to reopen Health Connect permissions.
- Retry only after a player action or settings change.
- Do not loop permission prompts.
Routes, writes, and deletes
Section titled “Routes, writes, and deletes”- Routes can require a separate consent flow.
- Read permission does not permit writing.
- Each optional workout metric needs matching write permission.
- Deletes require a valid record ID and should target app-created data.
Package and verify
Section titled “Package and verify”Use a fresh artifact from the source under test. Record its checksum, package, version, and signing identity; install that exact artifact and test grant, partial grant, denial, revoke, retry, and cleanup behavior.
