Last active
November 23, 2018 19:08
-
-
Save rootasjey/6df4b4a2015a6cd37b11708f9ea0c56d to your computer and use it in GitHub Desktop.
fitbit settings messaging on app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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