Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

feature request - real time API to retrieve heart rate and steps

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.

Best Answer
13 REPLIES 13

Heart rate and step (and some other) data is available in real time for Fitbit OS devices via the Device API.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer

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

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer

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

 

Best Answer
0 Votes

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

Best Answer
0 Votes

I also have the same problem. I would be very helpful if someone from the Fitbit team shed some light on this.

Best Answer
0 Votes

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/

 

 

Best Answer

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.

 

Best Answer
0 Votes

@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.

Best Answer
0 Votes

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

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer
0 Votes