Hi I'm trying to implement settings on my watchface but I don't want to load settings on every onUpdate() but just before (onInitiialisation() or onLayout()) or when they changed...
So I'm trying to play with onSettingsChanged() but it doesn't seems to work...
Is the onSettingsChanged() postion in the code important? (actually mine is under onUpdate())
Here is how I implemented it...
function initialize() {
WatchFace.initialize();
}
// Load your resources here
function onLayout(dc) {
refreshSettings = true;
... do all other stuff ...
}
function onUpdate(dc) {
if ( resreshSettings == true) {
... get setting code ...
refreshSettings = false;
}
... do all other stuff ...
}
function onSettingsChanged() {
refreshSettings = true;
WatchUi.requestUpdate();
}
Any help ?