Android Project to find FatMax in real time with a Polar H10

Overview

FatMaxxer

According to recent research (see below) the FatMaxxer Android app may help you to exercise at the optimum effort level for fat burning, measured using just a Polar H10 heart rate strap.

See Bruce Rogers' review here: http://www.muscleoxygentraining.com/2021/06/fatmaxxer-new-app-for-real-time-dfa-a1.html.

Screenshot | Garmin notification

Overview

Android app for the Polar H10 to advise Detrended Fluctuation Analysis alpha1 (⍺1) in real time.

There are promising signs that running or cycling at ⍺1 = 0.75 corresponds to the first ventilatory threshold "VT1" or FatMax (https://www.frontiersin.org/articles/10.3389/fphys.2020.596567/full). This requires a reliable heart rate strap that can measure inter-heartbeat intervals very accurately (Polar H10) and a tool to measure ⍺1.

FatMaxxer reports ⍺1 for the past two minutes in "near real time" via the GUI, speech (speaker/headphones, configurable) and notifications (configurable). The ⍺1 value and other features are calculated over a two minute rolling window of RR values, with ⍺1 calculated every 20 seconds (configurable). The RR stream is subject to artifact filtering, where adjacent RR intervals change by more than +/- threshold (%). Threshold settings are 5%, 25% and "Auto". The "Auto" setting uses a threshold of 5% when HR > 90 BPM and 25% when HR < 85 BPM.

License

Apache 2.0 for any code that was authored by me.

Getting started

User Interface

Shows ⍺1, plus detected artifacts, number of samples and therefore artifact rate (%) over the window; elapsed time; instantaneous heart rate and heart rate variablility (RMSSD). Android UI screenshot above (shows out of date buttons) shows output after a recent run including a warmup to a HR in the 130--140 range, then steady at approx 137 bpm, with ⍺1 fluctuating between approx 0.75--1.0.

Graph plots:

  • X axis: time (minutes) with a 2 minute viewport
  • primary Y axis (0-200):
    • red trace: HR (BPM)
    • green trace: ⍺1 x 100 (e.g. 0.75 reads as 75). Yellow and red lines at 75 and 50 (HRVVT1100 and HRVVT2100). Grid lines at multiples of 25
  • secondary Y axis (0-10):
    • blue trace: artifacts (%)

Audio / notification (wearable) updates

Reports ⍺1 and other features via audio and/or notifications (configurable), adjusting to work rate:

Audio updates report ⍺1 at HR above a hardcoded threshold, and RMSSD otherwise. Reports artifacts above a hardcoded threshold, or at higher intensity. Audio updates are more frequent at higher work rates. Audible warning (click) is played on dropped artifact.

Notifications: A notification update is sent whenever ⍺1 is recalculated. Notification title provides ⍺1 and artifacts dropped (%). This provides as a basic way to view output on a wearable (see photo above). Some Garmin devices show notification titles during activities (see photo above).

Logs

Log files are recorded to external storage and available for export via the Androd ShareSheet.

  • rr.log as per HRV Logger format
  • artifacts.log - timestamp for artifacts*.log is corresponds to the last processed sample of the window (watch this space) Output to "external" storage; may not work on Android versions later than 9-ish.

Known issues / limitations

  • Needless to say, I will not be held responsible for any app malfunction which causes you to overtrain!
  • GraphView plotter is quirky and could be replaced
  • Android may pause (kill) the app unpredictably. Enable the "Leave screen on" option, check on the app regularly, and avoid using other apps while in use.
  • Audio update period should not need to be customized; it should be detectable from metrics like ⍺1---it's an objective measure of effort, after all
  • UI cleanup to show battery, demote RMSSD, remove ugly status line
  • features.csv does not output SDNN

Acknowledgements

Comments
  • Graph disappears after and export not working

    Graph disappears after and export not working

    Just tried the latest release with a1v2 for an hour workout. Most things seem to be working except:

    1. line graph disappear after 2min
    2. unable to export log. after selecting the logs to export, nothing happens.

    fatmaxxer_line_graph_disappears

    bug testing 
    opened by afxmedia 9
  • App crash

    App crash

    Hi.

    I try the app in 2 android smartphones, in one the app open but after 3 seconds close (Samsung A52) and in other crash immediately (Huawei Mate 20 Pro) both with android 11.

    bug testing 
    opened by samoramobile 8
  • latest build crashes on start, debug log can't be shared

    latest build crashes on start, debug log can't be shared

    I used a build from 14th June for several hours without problem, but the latest app-debug.apk crashes on start. I set permissions for storage and location. Also I can't share the generated debug log. When I try to send it via mail or upload it I get error messages file not found or file not supported.

    opened by dhanek 5
  • Configuration for Notifications

    Configuration for Notifications

    The app has now an extra option to disable the notification text body to save screen space. But when the text body is disabled, there is still a blank line. Turns out that only very little space is saved that way. The notifications on an EDGE 830 are still too intrusive hiding about 30% of the screen.

    enhancement 
    opened by MedTechCD 3
  • Suppress graph and log output for the first two minutes

    Suppress graph and log output for the first two minutes

    Features based on the 2 minute sample window, such as alpha1 and rmssd, must not be graphed or logged for the first 2 minutes, as they are not well defined.

    opened by IanPeake 2
  • Notifications

    Notifications

    Sound notifications are awkward. Keeps repeating the same words 4-5 times before the actual numbers come through. Maybe because I have the calculation update on 5sec? Notifications on Garmin Edge 830 come through but take up a lot of screen space, see attached screenshot. Even with longer calculation period, the notification stays quite long , hiding the lower half off the screen. Only the first line would be enough, but I don't know if you can decide what comes through. Edge830 Great to see someone is developping an app for real-time alfa1!

    opened by MedTechCD 2
  • Time stamp precision

    Time stamp precision

    Have the features file time stamps be of the precise same time as the interval set in options. This would make comparison to PC software like kubios much easier. Thank you.

    bug testing 
    opened by Bjrmd 1
  • Certificate exception

    Certificate exception

    "java.lang.SecurityException: GoogleCertificatesRslt: Package signed with debug key (go/gsrlt)" reported on Play Store console.

    The issue seems to be similar to the one reported here:

    https://stackoverflow.com/questions/64196715/securityexception-googlecertificatesrslt-not-allowed

    bug testing 
    opened by IanPeake 0
  • Investigate returning to external storage using up to date API

    Investigate returning to external storage using up to date API

    It appears external storage is appropriate for storing log files even in recent Android versions:

    https://developer.android.com/training/data-storage/shared/documents-files

    enhancement testing 
    opened by IanPeake 0
  • App freezes at 1:50 two times then works

    App freezes at 1:50 two times then works

    Screenshot_20220825-162239_FatMaxxer Describe the bug A clear and concise description of what the bug is.

    FatMaxxer version number or name

    • The version name can be found under App Info while the app is running

    Phone Manufacturer, Model and Android Version

    • Manufacturer
    • Model
    • Version [e.g. 22]
    opened by DrJoe61 6
  • Fatmaxxer closes after recording for ~10  seconds

    Fatmaxxer closes after recording for ~10 seconds

    Thanks for the app! Unfortunately I can't get it working Describe the bug I have connected my polar H10 which was updated to 3.0.50 with polar flow. Bluetooth with 2 receiving devices and location are on. Have tried recording in developer and non-developer mode. The app starts to record and then closes after about 10-15 seconds

    FatMaxxer version number or name

    • The version name can be found under App Info while the app is running - couldn't see this, but was app-debug.apk downloaded from github.

    Phone Manufacturer, Model and Android Version moto e7 power Motorola Android 10 ftmxr_20220627_120052_.debug.log

    opened by GraceEMc 2
  • Karoo 2 Sideload

    Karoo 2 Sideload

    Hi Ian, I have been able to successfully side load Fatmaxxer onto my Karoo 2 and the app seems to be running as expected. I am having difficulty accessing the log files. I was able to see some files via the Android File Transfer app on my mac so I know it's possible but I don't know how the app decided to store those particular files. I've tried several times to export my ride data but I'm unable to see them via AFT. Also, is there a way to manually start and stop the app from recording data? I've generated several log files that I don't need and the small screen on my device makes it unwieldy to manage. Can you help?

    opened by albidrez 1
  • FatMaxxer App Does not connect to H10 on Samsung A425G

    FatMaxxer App Does not connect to H10 on Samsung A425G

    Describe the bug Does not connect to H10 on Samsung A425G

    FatMaxxer version number or name

    • The version name can be found under App Info while the app is running
    • 210707_2112.main.0453da4

    Phone Manufacturer, Model and Android Version

    • Samsung
    • A42 5G
    • Android 11

    Hi,

    Pairing does not work either trying to discover (does not find anything), or by entering the device 8 character identifier manually.

    I am able to connect with Polar Beat to the H10 strap.

    I'm not trying to pair when already paired using the Polar app (though I have tried that as well).

    Thanks Robert

    opened by se71 1
Owner
null
FirestoreCleanArchitectureApp is an app built with Kotlin and Firestore that displays data in real-time using the MVVM Architecture Pattern. For the UI it uses Jetpack Compose, Android's modern toolkit for building native UI.

FirestoreCleanArchitectureApp FirestoreCleanArchitectureApp is an app built with Kotlin and Cloud Firestore that displays data in real-time using Andr

Alex 66 Dec 15, 2022
Online real-time android quiz game

KQuiz Описание проекта Проект представляет собой мобильное приложение, выполнящее роль платформы для создания, поиска, организации и выполнения онлайн

Konstantin Albatov 1 Sep 1, 2022
An Android app that scans images or human faces in real time and detects whether the mask is worn or not, with the ability to set an audible alert

Swift Mask Real time face mask detection Brief overview Swift Mask scans images or human faces in real time and detects whether the mask is worn or no

Giorgio Cantoni 4 Sep 22, 2022
A webapp which generates a simple Discord profile banner image in real-time which shows user's status and activity.

DiscordProfileBanner This tool generates a Discord profile banner image in realtime. I wrote it for use in my AniList profile. An example in action: H

Quanta 11 Oct 17, 2022
The app features real-time chatting between different users on daily topics

DailyDiscuss The app features real-time chatting between different users on daily topics. The app comes with 2 types of user interface: Admin who crea

null 1 Dec 20, 2021
Task Manager feat. real-time competitive system and user engagement

Dira Что из себя представляет Dira? Android-приложение Directa (сокр. Dira) - это планер, который способен улучшить жизнь пользователей. Он позволяет

Konstantin Albatov 4 Sep 28, 2022
sample project that shows you how you can use Ktor to creat a server for real Project.

Ktor-Sample This is a sample project that shows you how you can use Ktor to creat a server for real Project. What is done Save data to database (Get a

Mohamed Emad 4 Dec 23, 2022
This is a practice app. An app that you can find random recipes and choose the ones you like.

A food suggestion app like Tinder This is a practice app. In this app, you can find random recipes and choose the ones you like. This is main menu. Yo

Yunus Emre OCAK 4 May 25, 2022
Help find conflict in gradle.

Dependency Conflict Analyzer Gradle Plugin This plugin scans dependencies during gradle build. Throws an error if there is a possible dependency confl

Daniil Ch. 2 Oct 5, 2022
🎓 Learning Kotlin Coroutines for Android by example. 🚀 Sample implementations for real-world Android use cases. 🛠 Unit tests included!

Kotlin Coroutines - Use Cases on Android ?? Learning Kotlin Coroutines for Android by example. ?? Sample implementations for real-world Android use ca

Lukas Lechner 2.1k Jan 3, 2023
Grupo Zap - Viva Real

Grupo Zap - Viva Real How to run locally To run the application you need an installed emulator or a connected smartphone. The app's minimum Api is 21,

Leandro Lara 0 Nov 18, 2021
Meetups microservice, applying tactical DDD building blocks and in a real example.

Meetups microservice: Applying tactical DDD Description This project is a practical example to understand the tactical patterns/building-blocks that d

Albert Llousas Ortiz 6 Aug 2, 2022
A Simple Android library to get the number of words and give you the time it will take you to finish an article/story.

MinRead A Simple Android library to get the number of words and give you the time it will take you to finish an article/story. Prerequisite Androidx K

Nwokocha wisdom maduabuchi 36 Nov 17, 2021
Android application for tracking accumulative time of projects.

TimeTracker Track the time you've put into hobby projects, studying or work. Features: Data stored in local SQL database Built with Google MVVM archit

Karl Öqvist 3 Mar 5, 2022
TimeTrackerApp Android - Time Tracker App developed in kotlin

Time Tracker App (Android) It is a simple android app developed in kotlin progra

null 0 Feb 18, 2022
Compile-time dependency injection for Kotlin Multiplatform

Kinzhal Kinzhal is a Kotlin Multiplatform library for compile-time dependency injection. The goal is to emulate basic features of Dagger to achieve si

Artem Daugel-Dauge 59 Dec 21, 2022
This prototype app provides a list of events to be held under an organization (school, college, club, etc.) and the users can manually set event reminders at their scheduled time so that they do not miss an event.

E-CELL NITS Sample App This prototype app provides a list of events to be held under E-Cell NIT Silchar (for example, Srijan 2.0) and the users can ma

Ritam Nath 1 Nov 7, 2021