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

Third party integration with FitBit

Hello all,

I am trying to get the Fitbit data and use it to visualize in order to get a better understanding of my health data. May I know what is the best way to do this (preferably in python or Java)? 

Thank you.

Best Answer
4 REPLIES 4

This would indeed be helpful to know.n  The existing apps are way to limiting even though they have collected my data, I cannot really make full use of it.

Best Answer
0 Votes

This is possible. There are a few ways to accomplish this. First you need to access the data. Look into the device API for this. If you do not want raw data, perhaps the Today class is where you should start. 

 

Then, you need to do something with the data. There are a few options.

1) Make a companion Fitbit app to display the data you want. It should be noted that you can use some npm plugins if you develop using the CLI.

2)Post the data to a website and then modify it in the way you like (there are security considerations here). 

3)Use the fetch() and post () methods to interact with a localhost server running on the host device. That can be in the language of the host device (my in-progress Android battery level app has a server running). I wrote it in Java, but Kotlin is also an option. For apple, I would suggest Swift unless you are well veraed in CPP.

4) Some combination. 

 

 

Best Answer

Since you are running/developing a similar app that does these steps, is there any way in which you can share the GitHub repo? It will be very helpful. 

Best Answer
0 Votes

Though I do not want to share the battery app due to publishing ports and all, I have been wanting to make a sample for a while, so here it is

 

I have only one-way communication, and it is only using text, but you can see the process.  Changing to CBOR or JSON would be easy, I just wanted to focus on the mechanics of the communication and as such, am just moving a simple string.

 

The event handlers are not as smooth as they could be, but it does work (you may need to be patient with the callbacks.

If you do not want to upload the fitbit app into the Online SDK Manager, you could just use the CLI.

 

It works well in Vscode. I installed an SVG plugin, and once you tell it that .gui files are SVG, it has full linting support.

 

It is currently only for Android as I have done no Apple developing.  I would be interested to know if this is possible without paying them 100 dollars a year as this is merely a hobby for me currently.

 

Best Answer
0 Votes