08-28-2021 08:18
08-28-2021 08:18
Hello, I'm working on a native Android/iOS app that will require real time heart rate data from smart watches. I already have a Fitbit so I figured it'd be a good place to start.
Am I correct that accessing the heart rate monitor directly from the mobile OS is not doable, and that I will need to have a FitbitOS app running in the foreground on the watch, accessing the heart rate monitor via the device API, and sending the data to the Fitbit phone app via the messaging API, which then can send the data to a server running on the phone?
Answered! Go to the Best Answer.
08-28-2021 14:38
08-28-2021 14:38
That's 98% right. It's possible to use File Transfer instead of messaging (there are pros and cons), and the server doesn't need to run on the phone (it can run anywhere but must have non-self-signed security).
08-28-2021 14:38
08-28-2021 14:38
That's 98% right. It's possible to use File Transfer instead of messaging (there are pros and cons), and the server doesn't need to run on the phone (it can run anywhere but must have non-self-signed security).
09-06-2021 19:56
09-06-2021 19:56
Can I get the current heart rate from the watch and display it in the android app(written by me) without a server?
09-06-2021 20:43
09-06-2021 20:43
The most direct route would be for the android app (written by you) to be a server; ie, able to receive a fetch() or websocket request. Those are the only ways to get real-time data out of the device.
09-08-2021 23:05
09-08-2021 23:05
Does the watch connect to the phone and share the same network with the phone ip? And can I use http://localhost:port to do the websocket and connect with the phone app directly?
09-09-2021 00:08
09-09-2021 00:08
You never actually get to communicate directly with the watch. The watch communicates with the companion, which runs within the Fitbit app on the phone.
I don't think 'localhost' will work, but there are some equivalents that may work for you. Obviously this presupposes that your Android app/server is running on your phone (as is the Fitbit app), so 'same network' doesn't apply.
Also, this might help.