Overview
The Synheart Wear Kotlin SDK provides native Android support for streaming biometric data from wearables via Health Connect, vendor cloud APIs (WHOOP, Garmin, Fitbit, Oura), and direct BLE heart-rate sensors.Installation
Gradle (Kotlin DSL)
Published to Maven Central asai.synheart:synheart-wear:
Requirements
- Android SDK API 21+ (target SDK 34+)
- Kotlin 2.3+
- Android Gradle Plugin 9.0+ (Gradle 9.2+)
- Health Connect installed on device (built-in on Android 14+, otherwise via Play Store)
Quick Start
Initialize SDK
Request Permissions & Initialize
Real-Time Streaming
Health Connect
Reads from any wearable companion app that syncs to Jetpack Health Connect — Fitbit, Garmin Connect, Samsung Health, Google Fit, Polar Flow, etc. (Apple Watch is not supported on Android — it only syncs to Apple Health on iOS.)AndroidManifest.xml
The SDK ships its ownAndroidManifest.xml declaring all 17 Health Connect read permissions plus the <queries> block for the Health Connect app, so the consumer app inherits them automatically. If your app needs a privacy-policy intent (required by the Play Store policy for Health Connect apps), add this in your own manifest:
Supported record types
HealthConnectAdapter reads: HeartRateRecord, HeartRateVariabilityRmssdRecord, RestingHeartRateRecord, StepsRecord, TotalCaloriesBurnedRecord, ActiveCaloriesBurnedRecord, DistanceRecord, ExerciseSessionRecord, SleepSessionRecord, OxygenSaturationRecord, RespiratoryRateRecord, BodyTemperatureRecord, WeightRecord, HeightRecord, BodyFatRecord.
Caveats
- On devices below Android 14 without the Play Store Health Connect app, the adapter returns an empty snapshot rather than throwing. Check
HealthConnectAdapter.getAvailabilityStatus()to detect this case. - Per-record retention is platform-controlled (typically ~30 days for HR, longer for sleep). For older data use a cloud OAuth provider.
Cloud providers (WHOOP / Garmin / Fitbit / Oura)
Each cloud vendor is exposed via a typed accessor onSynheartWear plus the generic getProvider() lookup:
provider.connect() to get an authorization URL, open it in a browser, then call provider.connectWithCode(code, state, redirectUri) from your deep-link handler. Full code sample in the SDK README’s Cloud Wearables section.
BLE Heart Rate Monitor
Connect directly to any standard Bluetooth LE heart rate monitor for real-time HR streaming.Setup
Add toAndroidManifest.xml:
Usage
Supported Devices
Works with any BLE device implementing the standard Heart Rate Profile (0x180D):- WHOOP (Broadcast HR mode)
- Polar H10, OH1
- Wahoo TICKR
- Garmin HRM-Pro / HRM-Dual
Garmin Health SDK (Native RTS)
TheGarminHealth facade provides native Garmin device integration for scanning, pairing, and real-time streaming using generic SDK-owned types.
Important: The Garmin Health SDK Real-Time Streaming (RTS) capability requires a separate license from Garmin. This facade is available on demand for licensed integrations. The underlying Garmin Health SDK code is proprietary to Garmin and is not distributed as open source.
GarminProvider instead.
Resources
- Repository: synheart-wear-kotlin
- Full README: View on GitHub
- Issues: GitHub Issues