11-24-2017 08:48 - edited 11-24-2017 08:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 08:48 - edited 11-24-2017 08:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.
Answered! Go to the Best Answer.
Accepted Solutions
11-27-2017 12:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-27-2017 12:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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

11-27-2017 12:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-27-2017 12:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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

11-28-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-28-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

02-19-2018 05:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-19-2018 05:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

02-19-2018 05:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-19-2018 05:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Obviously the companion does not store any data.
They are sent to a specific cloud service using a REST API
02-19-2018 08:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


02-19-2018 08:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You can use local storage in the companion.
09-04-2018 07:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-04-2018 07:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

09-04-2018 12:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-04-2018 12:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
"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.

09-04-2018 13:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-04-2018 13:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@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.

09-04-2018 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-04-2018 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

