Skip to content

Instantly share code, notes, and snippets.

@rootasjey
Last active November 23, 2018 19:08
Show Gist options
  • Save rootasjey/6df4b4a2015a6cd37b11708f9ea0c56d to your computer and use it in GitHub Desktop.
Save rootasjey/6df4b4a2015a6cd37b11708f9ea0c56d to your computer and use it in GitHub Desktop.
fitbit settings messaging on app
// App
import * as messaging from "messaging";
// Received message containing settings data
messaging.peerSocket.addEventListener("message", function(evt) {
settings[evt.data.key] = evt.data.value;
// Update Immediately weather value when unit changed
if (evt.data.key === 'weatherRefreshTime') {
// do something
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment