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.
Best AnswerI'd try the file transfer API. It seems a bit more reliable and is better suited to larger chunks of data.
Best AnswerHello 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.
Best AnswerI'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.
Best AnswerThank 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!
Best Answer