09-04-2018 18:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-04-2018 18:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi everyone.
I'm developing an app that collects raw accelerometer data from an Ionic device and save them to an internal file in the Ionic device.
I'm then using the Message API to send chunks of those files to the companion app (since FileTransfer API only allows to go from companion app to fitbit device).
What I would like to do next is saving those data to a specific file in some folder of the companion device (my phone).
Is there any way to do that?
The only way I can use those data and process them for my research seems to be by pushing them to a web server; which I don't have and also takes a little more time.
Another stupid way to do it is to log the meaningful data, and share it going to the Fitbit app under "developer menu -> click on the app on development -> Logs" which is really really bad not only because those data needs a little parsing, but because is massively goes against the principals of programming since it requires a human input.
Answered! Go to the Best Answer.
Accepted Solutions
09-06-2018 09:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-06-2018 09:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have seen some developers create a local webserver on an Android phone, but I'm unsure of the mechanics of that, other than they use fetch() in the companion to send data via post. Or you can post the data to a webserver on the local network, or internet.
https://stackoverflow.com/questions/29775797/fetch-post-json-data

09-06-2018 09:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-06-2018 09:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The only way to get data is via a webserver. That can be local or remote, but iOS doesn't provide a method for sharing data or messages between apps.

09-06-2018 09:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-06-2018 09:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit wrote:The only way to get data is via a webserver. That can be local or remote, but iOS doesn't provide a method for sharing data or messages between apps.
I see. Thank you.
Is there any documentation on how to use a local server? And by local, do you mean on the device itself? Which would be the phone where the companion app is running? (I'm running Android).
If no documentation is available for that purpose, will I be able to use the general JavaScript code that lets me push that data to a remote folder on a Cloud storage (let's say OneDrive)?

09-06-2018 09:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-06-2018 09:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have seen some developers create a local webserver on an Android phone, but I'm unsure of the mechanics of that, other than they use fetch() in the companion to send data via post. Or you can post the data to a webserver on the local network, or internet.
https://stackoverflow.com/questions/29775797/fetch-post-json-data

09-06-2018 10:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-06-2018 10:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit wrote:I have seen some developers create a local webserver on an Android phone, but I'm unsure of the mechanics of that, other than they use fetch() in the companion to send data via post. Or you can post the data to a webserver on the local network, or internet.
https://stackoverflow.com/questions/29775797/fetch-post-json-data
Sounds good. I'll look into it. Thanks for that

