.... when a watch face is shutting down..
... when the app is shutting down.....
function onUpdate(dc) {
var stringDim = dc.getTextDimensions("A", Gfx.FONT_SMALL);
var drawStartMillis = Sys.getTimer();
if(hiding) {
return;
}
// Simulate expensive operation (exaggerated for illustration)
while(Sys.getTimer() - drawStartMillis < 1500) {
}
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_BLACK);
dc.drawText(10,
10 + stringDim[1] * (testIndex % 6),
Gfx.FONT_SMALL,
Lang.format("$1$: hiding=$2$", [testIndex, hiding]),
Gfx.TEXT_JUSTIFY_LEFT);
testIndex++;
}
View onHide
App onStop
Complete
App onStop