What about emitting an "alarm" event? An app could add an handler for it like
Bangle.on("alarm", (important) => {
// save state?
var ret = ?
// ret = 1: exit app and show the alarm
// ret = 2: remain in the app and show a blinking icon in widget bar
// ret = 0: ignore the alarm
return ret;
});
Bangle.on("afterAlarm", () => restore..)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What about emitting an "alarm" event? An app could add an handler for it like
Could be an idea?