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

putting real-time heart rate data in a file

ANSWERED

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? 

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I'd try the file transfer API. It seems a bit more reliable and is better suited to larger chunks of data.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

I'd try the file transfer API. It seems a bit more reliable and is better suited to larger chunks of data.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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. 

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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! 

Best Answer
0 Votes