Atrial fibrillation and heart rate monitoring app

Search This thread

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
Hi all,

I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.

Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.

I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.

Update: AFib monitor Google Play link
 

Attachments

  • Screenshot_20230310_112723.png
    Screenshot_20230310_112723.png
    27.9 KB · Views: 1
  • output-onlinepngtools (3).png
    output-onlinepngtools (3).png
    43.9 KB · Views: 1
Last edited:
  • Like
Reactions: rodken

bernarbernuli

Senior Member
Aug 26, 2010
348
771
Vigo
www.htcmania.com
Hi all,

I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.

Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.

I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.

Hi, I have tried your app, it's great that you are doing this.

I have tested it on Ticwatch Pro 3 GPS, it works correctly, shows heart rate and cardiogram for arrhythmias.

When I started the app for the first time it did not ask me to enable sensor permissions nor did it alert me that it did not have the permission enabled when I started monitoring. I activated them manually and it worked as expected.

About the PPG sensor address for TWP3 I don't know which one it is, I guess it is the same as the Fossil Gen5, because it works.
 
  • Like
Reactions: Gastopako

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
Hi, I have tried your app, it's great that you are doing this.

I have tested it on Ticwatch Pro 3 GPS, it works correctly, shows heart rate and cardiogram for arrhythmias.

When I started the app for the first time it did not ask me to enable sensor permissions nor did it alert me that it did not have the permission enabled when I started monitoring. I activated them manually and it worked as expected.

About the PPG sensor address for TWP3 I don't know which one it is, I guess it is the same as the Fossil Gen5, because it works.

Thank you so much! Didn't expect such a quick feedback!
I'll try correcting the permission part. And it's great to know, that app is compatible with TWP3.
Just in case, keep in mind, that this app runs in the background and should be stopped manually.
 

a0323022

New member
Jun 1, 2009
3
1
Hi, I would like to try this on my Fossil 6. Do you install the .apk on the watch or phone? Sorry, I've never installed outside of PlayStore.
 
  • Like
Reactions: Gastopako

mangobot

New member
Jun 4, 2013
2
1
Hi all,

I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.

Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.

I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.

Looks to me like Samsung has their sensor hidden behind this 'privileged' api, might be worth trying to request access?
 
  • Like
Reactions: Gastopako

mangobot

New member
Jun 4, 2013
2
1
Actually I was able to find a couple potential addresses for the Samsung sensor when I poked around a bit, were you unable to actually access the hardware even with the address?
 

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
Actually I was able to find a couple potential addresses for the Samsung sensor when I poked around a bit, were you unable to actually access the hardware even with the address?
Thanks for the tip. As I matter of fact I did try contacting them in the exact same way you showed, however, I the declined my request without explanation. Maybe it is because I didn't mention any affiliation with business or something like that. I'll try requesting once again.

I also tried reading all the accessible sensors in Watch 4, however, software access to the PPG sensors is restricted.

I guess the sensor you are referring to is this one:
Samsung PPGBatch Sensor /Type_String: com.samsung.sensor.ppg_batch /Type_number: 69668

Galaxy Watch 4 offers wide range of sensors and I have developed quite a lot of various algorithms, which could be implemented, e.g., continuous SpO2 monitoring (red and infrared optical sensors), confirmation of a suspected atrial fibrillation (detected by using green light optical sensor) using an ECG strip.
 

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
I tested app on TicWatch E3 and it does work on this watch. However, I noticed that the quality of the Photoplethysmogram signal is worse than what I get in Fossil Gen 5 watch. With Fossil Gen 5 watch, you don't even have to search for a good spot on the wrist, the quality is always good and it is not the case with TicWatch E3. The algorithm in the app won't throw false alarms because of that, the signal quality is constantly monitored, however, with that kind of quality it would be tricky to detect AF if it was present.
 

exswim

Member
Aug 28, 2008
5
1
I apologize but I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
 

rodken

Senior Member
Jan 11, 2010
1,540
676
I apologize but I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
You might want to consider utilizing Bugjaeger Mobile ADB as a really alternative and innovative solution to the problem of sideloading apps on Wear OS devices.
 

exswim

Member
Aug 28, 2008
5
1
Thanks for the reply. Another question, as I said the Wear Installer 2 indicated that the app was installed. Would this app appear as an app in settings or in the launcher. If not, where is it on my watch?
 

exswim

Member
Aug 28, 2008
5
1
I tested app on TicWatch E3 and it does work on this watch. However, I noticed that the quality of the Photoplethysmogram signal is worse than what I get in Fossil Gen 5 watch. With Fossil Gen 5 watch, you don't even have to search for a good spot on the wrist, the quality is always good and it is not the case with TicWatch E3. The algorithm in the app won't throw false alarms because of that, the signal quality is constantly monitored, however, with that kind of quality it would be tricky to detect AF if it was present.
I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
 

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
Hi, I did some updates to the app, mainly in the representation of the heart rate change over time. There are some as to say, drawbacks because for now heart rate values are saved in a local variable, therefore, if app was closed and restarted, the previous heart rate log would not be saved. I also have some thoughts in adding additional screen for the parameters of atrial fibrillation if one was detected, however, still not sure what information (e.g., beginning and the end of the AF episode, duration of the AF episode, etc. ) regarding this would be relevant for an ordinary user. Maybe some of you might have ideas what info would be of utmost relevance for you.
 

Attachments

  • main_screen.png
    main_screen.png
    19.9 KB · Views: 38
  • hr_screen.png
    hr_screen.png
    27.4 KB · Views: 37
  • app-debug.apk
    16.4 MB · Views: 127

mura20

Senior Member
Dec 17, 2012
500
90
I would love to use this app on my Samsung Watch 5. I hope you succeed in getting access to the sensors on the Samsung Watches. I think your app would be very popular!
 
  • Like
Reactions: Gastopako

oppophoneuser

New member
Dec 4, 2022
2
0
Hi, I know it's a tech site but to anyone suffering from atrial fibrillation-one of the most common but least talked about causes is head and neck posture/atlas position, slumped forward posture- very common with the amount of time we spend on our computers- see Dr John Berg youtube channel -
A good chiropractor or acupuncture practitioner can help to correct these abnormal and harmful postures and could possibly save you from surgery or pacemaker..
Don't ignore other causes which are more serious though-especially in the lat 2 years- lots of people are getting abnormal blood clotting since having a certain injection or getting long covid.
 

Gastopako

Member
Aug 16, 2022
13
7
Android Wear
I would love to use this app on my Samsung Watch 5. I hope you succeed in getting access to the sensors on the Samsung Watches. I think your app would be very popular!
Thanks! I haven't motivated myself to fill the request for getting the sensor access yet. It is quite complicated. Another thing that I noticed is that the raw green PPG signal from Galaxy Watch 4 and 5 is sampled at 25 Hz. Mine algorithm uses higher sampling frequency. According to the info provided by Samsung, only RED and Infrared PPGs in Galaxy Watch 4 and 5 are sampled at 100 Hz.

I am planning on improving the app by integrating it with Health Connect or with something similar. Currently the app stores, e.g., heart rate data in temporary variables, which are cleared as soon as the app is restarted. Another option was to write data in the main storage; however, data management seems tricky to me, I wouldn't want to deal with databases on my own.
 
  • Like
Reactions: rodken

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello :)
    I have been looking for an opensource/privacy friendly heart-rate monitor for my tic-watch pro3 that i have stripped off all google and mobvoi app.

    This look very promising but it's also just a compiled APK.

    Are you willing to open it's code ? you don't have to give it an open license, but i would love to see a good heart-rate taking app that i can truly trust in the long run.
    Also github sponsor is a thing :D

    Hi,

    I haven't planned on making the code open but it might be an idea worth considering. For now my plan is to improve the app according to the feedback from the users. I've managed to get the app accepted for the open testing.

    Maybe this information will be useful for those, how would want to publish similar app. The issue for not accepting the app was that it didn't show heart rate. Since their tests are automatic and I assume they are using emulators for that (correct me if I am wrong), they are unable to simulate the functionality of the PPG sensor, which I was using to record raw PPG signal. However, emulators in Android Studio do provide heart rate emulation (sensor address 21). Thus, I decided to extend the app to use that sensors as well. However, my app shows the recorded signal on the screen and sensor 21 only returns heart rate values. A while ago I developed realistic PPG signal model, which generates PPG signal beat-by-beat according to the current heart rate. Thus, I used that model in order to retain the functionality of showing the signal in the main window (I noticed that this is a thing in some of the commercial devices and apps, they do not show real signals so that they didn't look ugly to those, who don't understand, artifact might ruin the experience). With that modification, I managed to generate PPG signal in the Android Studio emulator by changing the heart rate with the slider. Nonetheless, the app kept being rejected. I really didn't know what to do at this point, since google play support was literally non-existent. The final idea was to introduce "demo mode", which was turned on by default and showed the operation of the app using randomly generated heart rate and that was the thing which satisfied the reviewers... Although publishing experience was a pain in one place, however, current version of the app would work on even more devices. The problem is that the heart rate returned by the sensor 21 is averaged by using higher order filers, it is not beat-by-beat as to say, and I doubt that there would be a significant irregularity if there was an onset of atrial fibrillation.
  • 2
    Hi, I did some updates to the app, mainly in the representation of the heart rate change over time. There are some as to say, drawbacks because for now heart rate values are saved in a local variable, therefore, if app was closed and restarted, the previous heart rate log would not be saved. I also have some thoughts in adding additional screen for the parameters of atrial fibrillation if one was detected, however, still not sure what information (e.g., beginning and the end of the AF episode, duration of the AF episode, etc. ) regarding this would be relevant for an ordinary user. Maybe some of you might have ideas what info would be of utmost relevance for you.
    1
    Hi all,

    I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.

    Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.

    I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.

    Update: AFib monitor Google Play link
    1
    Hi all,

    I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.

    Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.

    I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.

    Hi, I have tried your app, it's great that you are doing this.

    I have tested it on Ticwatch Pro 3 GPS, it works correctly, shows heart rate and cardiogram for arrhythmias.

    When I started the app for the first time it did not ask me to enable sensor permissions nor did it alert me that it did not have the permission enabled when I started monitoring. I activated them manually and it worked as expected.

    About the PPG sensor address for TWP3 I don't know which one it is, I guess it is the same as the Fossil Gen5, because it works.
    1
    Hi, I would like to try this on my Fossil 6. Do you install the .apk on the watch or phone? Sorry, I've never installed outside of PlayStore.
    1
    Hello :)
    I have been looking for an opensource/privacy friendly heart-rate monitor for my tic-watch pro3 that i have stripped off all google and mobvoi app.

    This look very promising but it's also just a compiled APK.

    Are you willing to open it's code ? you don't have to give it an open license, but i would love to see a good heart-rate taking app that i can truly trust in the long run.
    Also github sponsor is a thing :D

    Hi,

    I haven't planned on making the code open but it might be an idea worth considering. For now my plan is to improve the app according to the feedback from the users. I've managed to get the app accepted for the open testing.

    Maybe this information will be useful for those, how would want to publish similar app. The issue for not accepting the app was that it didn't show heart rate. Since their tests are automatic and I assume they are using emulators for that (correct me if I am wrong), they are unable to simulate the functionality of the PPG sensor, which I was using to record raw PPG signal. However, emulators in Android Studio do provide heart rate emulation (sensor address 21). Thus, I decided to extend the app to use that sensors as well. However, my app shows the recorded signal on the screen and sensor 21 only returns heart rate values. A while ago I developed realistic PPG signal model, which generates PPG signal beat-by-beat according to the current heart rate. Thus, I used that model in order to retain the functionality of showing the signal in the main window (I noticed that this is a thing in some of the commercial devices and apps, they do not show real signals so that they didn't look ugly to those, who don't understand, artifact might ruin the experience). With that modification, I managed to generate PPG signal in the Android Studio emulator by changing the heart rate with the slider. Nonetheless, the app kept being rejected. I really didn't know what to do at this point, since google play support was literally non-existent. The final idea was to introduce "demo mode", which was turned on by default and showed the operation of the app using randomly generated heart rate and that was the thing which satisfied the reviewers... Although publishing experience was a pain in one place, however, current version of the app would work on even more devices. The problem is that the heart rate returned by the sensor 21 is averaged by using higher order filers, it is not beat-by-beat as to say, and I doubt that there would be a significant irregularity if there was an onset of atrial fibrillation.