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

How to access files in private folder of the Fitbit smartwatches?

ANSWERED

Hi,

I managed to store some JSON files on the Fitbit Ionic smartwatch private folder. I noticed that, in order to access the JSON files, I need to read them via Fitbit studio. Is there another way to read the content of my JSON files? I mean, can I read the files online using Fitbit web app, dashboard, etc? It's a bit inconvenient for me to run the Fitbit studio every time to read the data and due to some reasons, I do not want to store them on a server. Thanks for your answer in advance!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

There's no public storage of files, but you could post them from the companion to file.io, like this:

 

function postData(data) {
  fetch("https://file.io", {
    body: `text=${escape(JSON.stringify(data))}`,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    method: "POST"
  })
  .then(function(response) {
    return response.json();
  }).then(function(data) {
    console.log(`Created ${file}: ${JSON.stringify(data)}`);
  });
}

View best answer in original post

Best Answer
3 REPLIES 3

There's no public storage of files, but you could post them from the companion to file.io, like this:

 

function postData(data) {
  fetch("https://file.io", {
    body: `text=${escape(JSON.stringify(data))}`,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    method: "POST"
  })
  .then(function(response) {
    return response.json();
  }).then(function(data) {
    console.log(`Created ${file}: ${JSON.stringify(data)}`);
  });
}
Best Answer

Thanks for your answer. Does the app need to be published on Fitbit for the JSON to be posted to file.io through companion? Because I have not published my apps and prefer not to as the apps are for research purpose targeting specific groups of users,

Best Answer
0 Votes

file.io might not be the right solution for you in this case. You'll need to store the files on a server somewhere though.

 

You don't need to publicly publish your application, but you will need to upload it to gam.fitbit.com so you can install it on multiple devices.

Best Answer