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

transferring data from device app to companion

ANSWERED

I am collecting some hr data on Ionic device saving them on a file.

 

Which is the right way for transferring this data from device app to companion?

 

I've found this discussion and I'd like to know if it is really the only way for doing it.

https://community.fitbit.com/t5/SDK-Development/File-transfer-from-Ionic-back-to-phone/m-p/2261664#M...

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

At present you can only use the Messaging API to send data from the device to the companion/internet.

 

If your data is too large, you'll need to break it into chunks and send it.

 

https://dev.fitbit.com/guides/communications/messaging/#overview

View best answer in original post

Best Answer
0 Votes
9 REPLIES 9

At present you can only use the Messaging API to send data from the device to the companion/internet.

 

If your data is too large, you'll need to break it into chunks and send it.

 

https://dev.fitbit.com/guides/communications/messaging/#overview

Best Answer
0 Votes

Thank you for the feedback... I am currently working on transferring data breaking it in chunks but I am pretty worried about the error handling.

 

From messaging documentation:

"The onerror event will be emitted whenever the peer connection is lost, this usually means that one or more messages have been lost."

 

So I cannot be sure if the messages are really received by the companion or not.

Best Answer
0 Votes

Hello, but how do you store received data in phone's local storage? I don't see FS API in companion's part.

 

Thanks for clarification.

Best Answer
0 Votes

Obviously the companion does not store any data.

They are sent to a specific cloud service using a REST API

Best Answer

You can use local storage in the companion.

Best Answer

Can you please direct me to a link where it explains how to do it? I don't see any API for that or guide which explains that.

Best Answer
0 Votes

"You can use local storage in the companion."

Is there a way to actually access the storage of the companion device? Dealing with key-value pairs is not so useful as it implies the hassle to send data to a server, which many people can't just afford.

It seems quite bizarre to me that I can't just easily use the data I collect with the Fitbit app I made.

Best Answer
0 Votes

@HenReeco Can you start a new thread and explain what you're trying to achieve? The device has a file system API for reading/writing files. This thread is about transferring data to the companion and storing it.

Best Answer
0 Votes
I'm storing the data to my Ionic and I'm able to send it to the Companion app in the phone (with the Message API). I just would like to store the data I send in the mobile phone where the Companion App is running. Otherwise it would be hard to use the data I collected in the Ionic
Best Answer
0 Votes