Dispatching custom event in Fitbit SDK

I just upgraded my Fitbit charge 2 from 2016, to a Fitbit sense from 2020. After getting everything set up I took a quick look at the developer documentation and found myself in a web based IDE called Fitbit studio and before I knew it I had sideloaded a development demo app onto my new device.

And before I knew it, I had another side project in my repertoire. Make a cool little app that does stuff, just for me!

While developing the ability to switch between various “pages” I encountered the need to dispatch events with custom data. Though seemingly the Fitbit SDK doesn’t use the Javascript norms here and needs a slightly different approach. So here is what I learnt.

Read more