Read workout routes
Workout routes are optional provider behavior. Always check capability and the route result instead of assuming every workout contains coordinates.
Request a route
Section titled “Request a route”Use the Id from an imported FHealthBridgeWorkout:
FHealthBridgeService::GetWorkoutRoute( Workout.Id, [](const FWorkoutRouteReadResult& Result) { if (Result.bRequiresUserConsent) { // Explain the route request and launch the platform consent flow. return; }
if (!Result.bSuccess) { return; }
for (const FWorkoutRoutePoint& Point : Result.Route.Points) { // Convert the route to a project-owned map or preview model. } });In Blueprint, call Get Workout Route and use helper nodes such as Does Workout Route Result Have Route, Get Workout Route Result Point Count, and Try Get Workout Route Bounds.
Handle result states
Section titled “Handle result states”- Unsupported provider: hide or disable route UI.
- Successful result without a route: show “No route recorded.”
- Consent required: explain why the route is needed, request consent, and retry only after the player acts.
- Failed result: preserve the workout and show a recoverable route error.
Android Health Connect can require explicit consent for an exercise route. iOS uses the HealthKit workout route associated with the workout ID.
Render routes safely
Section titled “Render routes safely”- Do not assume points arrive at a constant interval.
- Fit the preview using computed bounds.
- Handle a single point and repeated coordinates.
- Avoid exposing exact routes in screenshots, logs, analytics, or support attachments.
Routes can reveal home, work, and travel locations. Treat coordinates as highly sensitive health and location data.
Verify
Section titled “Verify”Test no-route, one-point, multi-point, consent-required, unsupported, and failed results before device validation.
