11-25-2024 02:11
11-25-2024 02:11
Hi All,
Just started studying Fitbit and its API settings. I want to build a program that allows for real-time readings (or at least readings that update regularly within specific intervals), in a way that is not phone dependant. If I understand correctly, I can access real time data if I build an on-device app through the Device API, which operates on the Fitbit OS itself. Is building such an app the solution to my problem, meaning, I won't need my phone to access the data through the API (but rather just to sync and later use it with, say, the Web API)?
Thanks!
11-25-2024 11:44
11-25-2024 11:44
You're a bit right and a bit not. Yes, the only way to get near-real-time data is using the Device API which runs on Fitbit OS on the watch. However, the Device API can only communicate with the Companion API — which runs on the paired handheld device. In addition, very limited data can be inserted into the Web API database by third-party software (it's mostly read-only), so you'd probably need to write your own code in the Companion API to export it.
Also be warned that the Device API hasn't been released for current watches.
11-25-2024 13:16
11-25-2024 13:16
Thanks for the answer! So if I understand correctly, in order to retrieve sensor data, perform calculations with it and display visualizations using the app I am building, I can use the device API, and it is done locally on the watch - no need for phone. However, for syncing and using the data further, it can only be done via the companion API?
11-25-2024 13:26
11-25-2024 13:26
Yes — as long as the calculations and visualisations are all done on the watch. Also beware that the Device API has quite restricted graphics capabilities (eg, you don't get access to a display buffer).