I like the idea of just keeping the default messages app/widget with the library and deferring to custom apps if installed.
Maybe we could even do something like this:
// in message library:
Bangle.emit("message", event);
setTimeout(()=>{if (!event.handled) load("messages.app.js");});
// some music widget
Bangle.on("message", event=> {
if (event.handled || event.id != 'music') return;
event.handled = true;
/* display music info */
});
// custom messages boot.js
Bangle.on("message", event => {
if (event.handled) return;
event.handled = true; // probably not even needed?
load('custommessages.app.js');
});
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.
I like the idea of just keeping the default messages app/widget with the library and deferring to custom apps if installed.
Maybe we could even do something like this: