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

Is there a way to send fitbit data to my 3rd party app without using a server?

ANSWERED

think the Campanion api can do that, but if you look closely, it doesn't seem like it, so I ask for help.

 

If yes, please tell me how to do it 

 

my device versa2 / s8+

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Not using the SDK. Your only options are fetch() or WebSocket. That said, you can write your own server and host it on the companion device.

 

If you can't go via a server, you'll have to use the Web API.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
11 REPLIES 11

Not using the SDK. Your only options are fetch() or WebSocket. That said, you can write your own server and host it on the companion device.

 

If you can't go via a server, you'll have to use the Web API.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

There is api not supported by web api, so what I want is companion api :(...

 

Is there any other way? 

Best Answer
0 Votes

No, you're going to need a server of some sort.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

The only method I know is to run either a webserver or websocket server in your app, and communicate from the companion using either fetch() or websocket.

Best Answer
0 Votes

So, are filetransfer and message api that mobile sends to server, not device? Is this right?

Best Answer
0 Votes

No. File transfer and message API are between the watch (device) and the clockface/app companion code, which runs within the Fitbit app. They won't help you to get your data outside of the Fitbit system. For that, you have to use fetch() or WebSocket, which can go from your clockface/app companion code to a server.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I feel grateful Gondwana

 

So what is the last thing that file transfer and messaging api do? Can you give me an example?

Best Answer
0 Votes

Documentation (with examples) is here and here.

 

The last thing that messaging can do is to populate a variable in your companion code.

 

The last thing that file transfer can do is to save a file on your companion device. Unfortunately, there's no way to directly access that file from outside of the companion code, so you have to read it into one or more variables in your companion code.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Is the device that you are talking about here a fitbit device? 

 

So what the file transfer api does is store the file on the fitbit device.

 

I definitely understand that there is no way to send from fitbit device to my phone without going directly through the server. 

 

thx 🙂

Best Answer
0 Votes

It depends in which direction you're sending the file. In your case, you're probably sending it to the companion device (eg, phone). Therefore, the file will be on your phone, but not in any directory that you can access from outside of your companion code. That's why you need to onforward it to a server, even if the server is hosted on the phone.

Peter McLennan
Gondwana Software
Best Answer

It was really helpful 

thx bro have a nice day 🙂 

 

 

Best Answer