05-08-2018 21:13
05-08-2018 21:13
Hello,
I understand that Fitbit does not currently support any "real time" APIs to retrieve heart rate or steps.
I like to make a feature request to Fitbit product team to provide API in order to retrieve APIs real time. I am assuming this should be on high on Fitbit's feature list since almost all other competition (such as Apple Watch) offer real time APIs.
05-08-2018 21:49
05-08-2018 21:49
Heart rate and step (and some other) data is available in real time for Fitbit OS devices via the Device API.
05-08-2018 22:00
05-08-2018 22:00
Thanks for the info, where can I find some examples?
Is this a new feature? The following answer from Fitbit suggests this is *not* possible:
https://community.fitbit.com/t5/Web-API-Development/Live-data/td-p/1863914
05-08-2018 22:14
05-08-2018 22:14
The Device API is new to Fitbit OS devices (Ionic and Versa). The link you provided refers to the Web API, which is limited by the infrequency of device syncing.
Unfortunately, examples are a bit scattered. Some heart rate stuff is at https://dev.fitbit.com/build/guides/sensors/heart-rate/; step count and other metrics are described at https://dev.fitbit.com/build/reference/device-api/user-activity/. If you search, you'll find other examples.
05-08-2018 22:19
05-08-2018 22:19
It appears the Device API only runs on Fitbit devices, is that correct?
We are writing a mobile apple (iOS and Android) and need to retrieve heart rate and steps periodically (every few seconds) from the Android device. Is this possible currently?
Thanks
05-08-2018 22:39
05-08-2018 22:39
I think it would be, but it would require a fair bit of effort. You'd have to monitor the data on the Fitbit device using an app on the device (and only one app can run at a time). That app would need to communicate the data to the companion device every few seconds, which can be done using the available API. The biggest challenge would be getting the data from the companion app to your native app. This could be done using a fetch() call, but you may need to stage the data via an intermediate web site if you can't intercept the fetch() on the device itself.
05-08-2018 22:42
05-08-2018 22:42
The link below from Fitbit suggests heart rate and steps can be synced in real time. Will the Web API be able to get this data in real time with the following setting?
https://help.fitbit.com/articles/en_US/Help_article/1960
01-28-2019 12:03
01-28-2019 12:03
Hi CyrusA,
did you find a solution for this? I'm also looking to synchronize step data in real-time from a Fitbit device to an app I am developing, for a research project. Any help would be much appreciated.
Thanks
03-28-2019 12:31
03-28-2019 12:31
I also have the same problem. I would be very helpful if someone from the Fitbit team shed some light on this.
03-28-2019 13:33
03-28-2019 13:33
You would need to build an app for Fitbit OS which takes the data and sends it from the device to the companion using the messaging API. Then from the companion to the internet or local webserver using fetch() or websockets.
Steps (user activity)
https://dev.fitbit.com/build/reference/device-api/user-activity/
Heart Rate
https://dev.fitbit.com/build/guides/sensors/heart-rate/
Messaging
https://dev.fitbit.com/build/guides/communications/messaging/
06-24-2019 08:05
06-24-2019 08:05
Hi Jon,
We are also developing one app to get data from fitbit device but we are facing issue to get data from fitbit companion app if our fitbit app (on wearable) is in background. We just want to check is there any way to get real time data form Fitbit device if our app(on fitbit device) is not in foreground.
06-26-2019 06:53
06-26-2019 06:53
@miniunikove wrote:
Hi Jon,
We are also developing one app to get data from fitbit device but we are facing issue to get data from fitbit companion app if our fitbit app (on wearable) is in background. We just want to check is there any way to get real time data form Fitbit device if our app(on fitbit device) is not in foreground.
No, not if your app isn't running.
06-27-2019 17:24
06-27-2019 17:24
Hi @miniunikove
Are you interested in collaborating regarding your Fitbit integration?
We like to pay for the Fitbit integration code. We already successfully integrated Apple Watch, so we can also help you with this if you are interested.
If you or anyone else is interested, please contact me at behrouzb [at] gmail [dot] com
Thanks,
Bruce
06-27-2019 17:38
06-27-2019 17:38
In this context, there are no such things as foreground or background. A clockface/app is either running or it isn't. The only practical difference between not running and being uninstalled is that any data previously saved to the file system is retained.
If you need to be collecting data continually, your clockface/app must run continually. It's okay if the display goes off.
This clockface collects HR and activity data whilever it is running, and saves it to local storage. However, it has to deal with missing data, which it does by interpolating values and displaying them paler.