Skip to content

rykemc/Android-hr-Monitor

Repository files navigation

Android HR Monitor

A comprehensive Android application for monitoring heart rate from Bluetooth LE devices such as Sigma HR sensors, smartwatches, and other external heart rate monitors.

Features

  • Bluetooth LE Heart Rate Monitoring: Connect to any BLE heart rate sensor that supports the standard Heart Rate Service
  • Auto-Connect: Automatically reconnect to your saved heart rate device
  • Background Monitoring: Continue monitoring heart rate even when the app is closed or in the background
  • Data Storage: Save heart rate readings locally and to Android Health Connect
  • History View: View your heart rate history with statistics (average, min, max)
  • Real-time Display: See your current heart rate in real-time
  • Foreground Service: Persistent notification showing current heart rate while monitoring

Supported Devices

The app works with any Bluetooth LE heart rate monitor that implements the standard Heart Rate Service (UUID: 0x180D), including:

  • Sigma HR sensors
  • Polar heart rate monitors
  • Garmin devices
  • Wahoo fitness sensors
  • Apple Watch (when broadcasting HR)
  • Most fitness smartwatches and chest straps

Requirements

  • Android 8.0 (API 26) or higher
  • Bluetooth LE support
  • Location permission (required for BLE scanning on Android < 12)
  • Bluetooth permissions

Building the App

For detailed build instructions, see BUILDING.md.

Quick Start

  1. Clone the repository:
git clone https://github.com/rykemc/Android-hr-Monitor.git
cd Android-hr-Monitor
  1. Build using the provided script:
./build.sh

Or manually with Gradle:

./gradlew assembleDebug
  1. The APK will be generated in:
app/build/outputs/apk/debug/app-debug.apk

Note: First build requires internet connection to download dependencies from Google Maven Repository and Maven Central.

Requirements for Building

Requirements for Building

  • Android Studio Arctic Fox or newer (or command-line tools)
  • Android SDK with API level 34
  • JDK 8 or higher (JDK 17 recommended)
  • Internet connection (for first build only)

For complete build instructions, troubleshooting, and advanced options, see BUILDING.md.

Installation

  1. Enable "Install from Unknown Sources" in your Android device settings
  2. Transfer the APK to your device
  3. Open the APK file and follow the installation prompts
  4. Grant all requested permissions (Bluetooth, Location, Notifications)

Usage

  1. First Time Setup:

    • Open the app
    • Grant all permissions when prompted
    • Tap "Scan for Devices"
    • Select your heart rate monitor from the list
    • The device will be saved for auto-connect
  2. Background Monitoring:

    • Go to Settings
    • Enable "Background Monitoring"
    • Enable "Auto-Connect"
    • The app will continue monitoring even when closed
  3. View History:

    • Tap "View History" to see your heart rate data
    • View statistics including average, min, and max heart rate
    • Delete history if needed

Permissions

The app requires the following permissions:

  • Bluetooth: To scan and connect to BLE devices
  • Location: Required for BLE scanning on Android versions < 12
  • Foreground Service: To run monitoring in the background
  • Notifications: To show current heart rate in notification
  • Health Connect: To save data to Android Health Connect (optional)

Architecture

  • MVVM Architecture: Clean separation of concerns
  • Room Database: Local storage of heart rate readings
  • Kotlin Coroutines & Flow: Asynchronous data handling
  • Foreground Service: Background heart rate monitoring
  • Material Design 3: Modern UI components

Health Connect Integration

The app includes support for Android Health Connect to save heart rate data to the system health database, making it available to other health apps.

License

This project is open source and available under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

Support

For issues or questions, please open an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •