The below code works in simulator but not on device.
Tested myself on va3 with SW-Version 2.60 with CIQ 2.3.4, Eclipse 4.6.3 with CIQ 2.3.4
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;
using Toybox.Lang as Lang;
using Toybox.Application as App;
var lowPowerMode = true;
class TestWatchView extends Ui.WatchFace {
function initialize() {
WatchFace.initialize();
}
function onLayout(dc) {
setLayout(Rez.Layouts.va3(dc));
}
function onShow() {
}
function onUpdate(dc) {
var time = Sys.getClockTime();
var field = findDrawableById("Label");
field.setText(time.sec.toString());
field = findDrawableById("Label2");
field.setText(lowPowerMode.toString());
View.onUpdate(dc);
}
function onHide() {
}
function onExitSleep() {
lowPowerMode = false;
}
function onEnterSleep() {
lowPowerMode = true;
Ui.requestUpdate();
}
}