Set up Health Connect on Android
Android uses Health Connect. Runtime permission requests work only when the
matching android.permission.health.* declarations are present in the final
application manifest.
Prepare the device
Section titled “Prepare the device”- Use a supported Android device with Health Connect available and current.
- Add test records through a trusted health app or Health Connect test workflow.
- Confirm the player can open Health Connect’s app-permission screen.
Select HealthBridge permissions
Section titled “Select HealthBridge permissions”- Open Tools > HealthBridge > Permissions.
- Select the minimum read and write types required by the feature.
- Save the settings.
- Review the derived permissions under Project Settings > Plugins > HealthBridge.
The plugin includes manifest declarations for common exercise, heart-rate, steps, distance, calories, sleep, and selected body-measurement workflows. Additional registry types can require project-owned manifest entries.
Verify the final manifest
Section titled “Verify the final manifest”Do not assume that a permission row automatically reached the packaged app. Inspect the final generated manifest and confirm every requested permission is declared.
If a permission is absent from the manifest, Health Connect cannot offer it in the runtime prompt. Add the matching declaration through project Android configuration or a project-owned Unreal Plugin Language file, then rebuild.
Handle runtime consent
Section titled “Handle runtime consent”Android reports granted and denied permissions. Design for partial access:
- Keep unrelated features working.
- Disable only the operation that lacks permission.
- Explain how to reopen Health Connect permissions.
- Retry after the player returns from settings.
- Do not repeatedly open permission prompts without a user action.
Initialization can fail when required core access is unavailable or Health Connect is missing or outdated.
Routes and writes
Section titled “Routes and writes”- Workout routes can require a separate Health Connect consent flow.
- Writes require direction-specific permissions.
- A successful read permission does not permit writing.
- Delete operations use record IDs and should target app-created records.
Package and verify
Section titled “Package and verify”- Produce a fresh Android artifact from the source being tested.
- Inspect its final manifest.
- Install that exact artifact on the device.
- Confirm package and version identity.
- Test full grant, partial grant, denial, revoke-after-grant, and empty data.
- Remove synthetic records after write/delete testing.
Common failures
Section titled “Common failures”- Permission missing from prompt: check the final manifest.
- Initialization fails: check Health Connect availability and required access.
- Editor works but device fails: the editor uses mock data and bypasses native permission behavior.
- Route requires consent: complete the route-specific flow and retry.
See device validation and troubleshooting.
