06-27-2019 10:42
06-27-2019 10:42
Hello,
I am building a fitbit app that takes the real-time heart rate data of the user wearing it and puts it in a file, (a csv file preferably) in the storage of the companion (I would like to use windows 10 as the companion). How would I go about doing this? I know the device api has functions for heart-rate data retrieval so I got that but should I use the message api to send it to the companion?
Answered! Go to the Best Answer.
06-28-2019 14:01
06-28-2019 14:01
I'd try the file transfer API. It seems a bit more reliable and is better suited to larger chunks of data.
06-28-2019 14:01
06-28-2019 14:01
I'd try the file transfer API. It seems a bit more reliable and is better suited to larger chunks of data.
06-29-2019 05:57
06-29-2019 05:57
Hello Catplace,
I did as you suggested and used a file transfer. However, it doesn't seem to work for the Fitbit windows 10 app but it works on the mobile app. It seems like the companion inbox part doesn't work when on Windows 10. But also where is the file stored? Because I can't find it in my phone's storage.
06-29-2019 13:23
06-29-2019 13:23
I've had file transfers (in both directions) working on Windows companions.
As per the documentation, the file isn't stored on the companion in an externally-accessible location. The assumption is that you're going to process it within the companion's memory. (You could shove it into 'storage' but that still won't make it externally accessible.)
If you want to get the data outside of the companion, you'll probably have to use fetch() or WebSockets. The hard part is setting up a server (local or remote) to receive the data.
06-30-2019 06:38
06-30-2019 06:38
Thank you I will try this approach but can you tell me where I can learn about setting up a server to receive fitbit data? I'm new to this server stuff so any kind of help that will point me to the right direction would help a lot!