Monitor heart rate
The base HealthBridge plugin observes heart-rate data through the active health provider. HealthKit, Health Connect, and connected devices can synchronize samples after recording, so this path does not guarantee live timing.
Blueprint flow
Section titled “Blueprint flow”- Enable read permission for Heart Rate.
- Get
HealthBridgeSubsystemand bind On Heart Rate Updated. - Initialize HealthBridge.
- Check the provider’s heart-rate capability.
- Call Start Heart Rate Monitoring.
- Update transient UI when the event provides a sample.
- Call Stop Heart Rate Monitoring when the owning screen, actor, or game mode ends.
C++ flow
Section titled “C++ flow”#include "HealthBridgeEvents.h"#include "HealthBridgeService.h"
FDelegateHandle HeartRateHandle = FHealthBridgeEvents::OnHeartRateUpdated.AddLambda( [](const FHealthBridgeHeartRateSample& Sample) { const double BeatsPerMinute = Sample.BeatsPerMinute; // Update transient gameplay or UI state. });
if (TSharedPtr<IHealthBridgeProvider> Provider = FHealthBridgeService::GetProvider()){ Provider->StartHeartRateMonitoring([](bool bStarted) {});}Stop monitoring and remove delegates when their owner is destroyed.
Design for delayed data
Section titled “Design for delayed data”- Show the sample timestamp, not just BPM.
- Mark stale values as stale instead of presenting them as current.
- Handle long periods without a sample.
- Keep gameplay usable when heart rate is unavailable.
- Do not treat synchronization timing as a fixed polling guarantee.
Protect heart-rate data
Section titled “Protect heart-rate data”Do not send BPM, timestamps, source labels, raw callbacks, or record IDs to analytics, crash reports, general logs, or support tickets. Keep only the data required by the feature and follow the product’s consent and retention policy.
Verify
Section titled “Verify”The editor mock proves that your event and UI paths work. Physical-device testing is still required for permissions, synchronization, backgrounding, and real provider behavior.
See device validation before release.
