Real-time heart rate data

Access real-time heart rate data on your device using Thryve SDK. Users simply connect their heart rate monitor with Bluetooth broadcasting capabilities. Once connected, the data flows instantly to your mobile application, provided the connection is active.

Enhance your health or fitness application with easy access to real-time heart rate data using the Thryve SDK. Users can effortlessly connect their heart rate monitors that support Bluetooth broadcasting and your application will have real-time data available, provided the connection is active.

Use the real-time heart rate data availability via Thryve to build experiences for fitness enthusiasts to optimize their workouts using instantaneous heart rate feedback or allow for real-time heart rate monitoring in medical use-cases for improved care journeys.

chevron-rightVerified Heart Rate Monitorshashtag

Correct functionality has been verified for the following devices:

Connect heart rate monitor

Please refer to the direct bluetooth device connection documentation for information on how to connect a heart rate monitor.

Access real-time data

Capture live heart rate data via the onHeartRateDataReceived event in ThryveBLEEventListener. This event provides immediate access to data from connected heart rate monitors.

import ThryveCore
import ThryveCommons
import ThryveBLE

class BLEViewModel: ObservableObject, ThryveBLEEventListener {
---    
    //onHeartRateDataReceived method is a ThryveBLEEventListener event listener callback.
    //It is automatically triggered by ThryveSDK each time a Heart Rate ThryveBLEDevice is connected 
    //The data recorded by Heart Rate monitors is shared with the host application 
    func onHeartRateDataReceived(device: ThryveBLEDevice, response: ThryveResponse<ThryveBLEHeartRateMeasurement>) {
            guard response.successful else {
                  // Process all [ThryveErrors] in response.errors
                  return 
                }
               let heartRate = response.data 
               //process heartRate. example update UI
               //process the heart rate value with heartRate.heartRateValue.
               //process the sensor contact value with heartRate.sensorContactDetected
    }
---
}
circle-exclamation

Last updated