https://github.com/kibotu/heart-rate-ometer
Measures human heart rate using camera and flash light.
https://github.com/kibotu/heart-rate-ometer
android-library camera hacktoberfest rxandroid sensor
Last synced: 12 months ago
JSON representation
Measures human heart rate using camera and flash light.
- Host: GitHub
- URL: https://github.com/kibotu/heart-rate-ometer
- Owner: kibotu
- License: apache-2.0
- Created: 2018-01-08T21:25:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-04T07:32:34.000Z (over 6 years ago)
- Last Synced: 2025-04-14T04:37:39.841Z (about 1 year ago)
- Topics: android-library, camera, hacktoberfest, rxandroid, sensor
- Language: Kotlin
- Homepage:
- Size: 201 KB
- Stars: 105
- Watchers: 9
- Forks: 36
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.paypal.me/janrabe/5) [](https://about.me/janrabe)
# Heart-Rate-Ometer [](https://android-arsenal.com/details/1/6681) [](https://jitpack.io/#kibotu/Heart-Rate-Ometer) [](https://jitpack.io/#kibotu/Heart-Rate-Ometer) [](https://jitpack.io/com/github/kibotu/Heart-Rate-Ometer/master-SNAPSHOT/javadoc/index.html) [](https://travis-ci.org/kibotu/Heart-Rate-Ometer) [](https://android-arsenal.com/api?level=15) [](https://docs.gradle.org/current/release-notes) [](https://kotlinlang.org/) [](https://raw.githubusercontent.com/kibotu/Heart-Rate-Ometer/master/LICENSE)
## Introduction
Measures human heart rate using camera and flash light.
 
## How-it-works
[https://github.com/phishman3579/android-heart-rate-monitor/wiki/How-it-works.](https://github.com/phishman3579/android-heart-rate-monitor/wiki/How-it-works.)
## How to install
```groovy
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
implementation 'com.github.kibotu:Heart-Rate-Ometer:-SNAPSHOT'
}
```
## How to use
0 [Request camera permission](https://github.com/kibotu/Heart-Rate-Ometer/blob/master/app/src/main/kotlin/net/kibotu/heartrateometer/MainActivity.kt#L24-L27)
```xml
Manifest.permission.CAMERA
```
1 [Add surfaceView to your layout](https://github.com/kibotu/Heart-Rate-Ometer/blob/master/app/src/main/res/layout/activity_main.xml#L18-L22) which is required for the camera preview
```xml
```
2 [Subscribe to the beats per minute stream](https://github.com/kibotu/Heart-Rate-Ometer/blob/master/app/src/main/kotlin/net/kibotu/heartrateometer/MainActivity.kt#L29-L30)
```kotlin
HeartRateOmeter()
.bpmUpdates(context, preview)
.subscribe(
{ bpm: Int -> label.text = "$bpm bpm" },
Throwable::printStackTrace)
```
## How to build
```bash
graldew clean build
```
### CI
```bash
gradlew clean assembleRelease test javadoc
```
#### Build Requirements
- JDK8
- Android Build Tools 27.0.2
- Android SDK 27
### Notes
Follow me on Twitter: [@wolkenschauer](https://twitter.com/wolkenschauer)
Let me know what you think: [jan.rabe@kibotu.net](mailto:jan.rabe@kibotu.net)
Contributions welcome!
## Contributors
- [Jan Rabe](jan.rabe@kibotu.net) ported as Kotlin Rx Library: https://github.com/phishman3579/android-heart-rate-monitor written by
- [Justin Wetherell](https://github.com/phishman3579)
###License
Copyright 2018 Jan Rabe
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.