Overview
The Synheart Session Kotlin SDK provides a native SessionEngine that captures heart rate data, computes session metrics on-device, and optionally fuses behavioral signals alongside HR data. The engine is timer-driven, emitting session frames at configurable intervals and delivering a session summary when complete. The SDK supports pluggableBiosignalProvider (for HR sources) and BehaviorProvider (for behavioral signals) via reflection-based wrappers.
Installation
Maven Central
Local Module
Requirements
- Android API 21+
- Kotlin 1.9+
Quick Start
Mock Mode (Development)
Real BLE Heart Rate Data
Health Connect Heart Rate Data
Session Configuration
SessionConfig
ComputeProfile
Session Events
The engine callback receivesMap<String, Any> dictionaries with a "type" key.
session_started
session_frame
Contains flat metrics computed over the sliding window:biosignal_frame
Emitted whenincludeRawSamples = true. Contains raw biosignal samples for live display:
session_summary
session_error
Behavioral Signals
TheSessionEngine accepts an optional BehaviorProvider that fuses behavioral data into session frames.
Mock Behavior (Development)
Production (via synheart-behavior)
"behavior" key is only present in frames when a BehaviorProvider is configured and returns data.
Architecture
Custom Provider
Any class implementingBiosignalProvider can drive the session engine:
API Reference
SessionEngine
Resources
- Repository: synheart-session-kotlin
- Issues: GitHub Issues