onExitSleep() not triggered

Former Member
Former Member
onExitSleep() seems to be working fine when tested in the simulator for va3 and fenix 5x. But on a real device onExitSleep() does not seem to triggered even though the gesture is recognized on the device as the light is turned on.
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();
}
}