Skip to content

lmarceau/heart-rate-monitor-ble

Repository files navigation

Bluetooth LE heart rate monitor

Android application that tracks data coming from a heart rate monitor following the Bluetooth LE Generic Attribute Profile (GATT).

Introduction

This project scan surrounding LE devices, asking the user to choose which one to connect to. It shows the name of the device and use the battery service and heart rate profile to display and update the battery level and the heart rate. The heart rate data is then plotted to show the history. At the moment, up to 120 values are shown in the heart rate history chart but this can be increased if needed 👍

Screenshots

Device scan activity Device activity

Prerequisites

  • Android SDK 27
  • Android Build Tools v27.0.3
  • Grade 3.1.1
  • Java version 1.8
  • MPAndroidChart 3.0.3
  • JUnit 4.12

Building the project

You can clone this GitHub repository and open it into Android Studio. Be sure to have the prerequisites. This project uses the Gradle build system. To build this project, use gradlew build or import a project in Android Studio. Android emulator does not have bluetooth capabilities so you have to use this app on a real device.

You can use an application on another device to enable a heart rate monitor like LightBlue explorer which is available on iOS and Android. Before using the heart rate monitor application, pairing your health device through the settings screen of your phone might be necessary. If you use a virtual heart rate monitor, be careful to pair the virtual device and not your actual phone.

Tests

The application was tested with local and instrumented tests launched from Android Studio with Ctrl+Shift+F10. UI/Application Exerciser Monkey was also used to test the UI with

adb shell monkey -p lauriemarceau.heart_rate_monitor_ble -v 500

This command sent pseudo-random events to the application. Firebase Test Lab for Android Robo Test was also used to test the application on different devices and assure intercompatibility.

Project was based on

About

Heart rate monitor project with BLE for Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages