Weight widget (part 1)

Hi there,

This will be another watch app based blog post; I want to continue with my lately arisen interest in developing apps for Garmin Connect IQ. This time I want to develop a watch widget that fetches data from an external source of data, i.e. the app uses the Fitbit public API to get weight related data of the user, and presents those on the watch UI. We bought a Fitbit Aria, a WLAN capable intelligen scale, a couple of years ago and since that it has been easier to keep track of the weight data.

The Fitbit API is very extensive and it should be pretty easy get the desired data, but my greatest challenge will be to get it work with OAuth2. I’m not certain currently, how easy this all will be, but at least Connect IQ supports OAuth2 authentication so possible it should be. There are numerous web sites and tutorials explaining how the OAuth2 works, but this will be another one, as I want get a better understanding of the topic, and writing about it is one way of accomplishing it.

My target in the first place is to get the last weight measurement from Fitbit and show it on the widget. The future versions of the widget could then contain more fine-granular features, e.g. add graphs to illustrate development of the weight and show tendencies based on the data, enable various preferences in the app and possibly enable manual adding of the weight entries. The figure below illustrates my first sketch of the simplistic app UI. The most important data is obviously the current (the latest) measurement. Furthermore it is desirable to a graph of a few older weight measurements to see a tendency whether the user is gaining or losing weight. 

That’s it for today. In the following part of this series I will proceed to the actual coding and plan to implement the basic authentication against the Fitbit API. Have a nice weekend!

One thought on “Weight widget (part 1)

  1. Pingback: Weight widget (part 2) – Living to run and running to live.

Leave a Reply

Your email address will not be published. Required fields are marked *