This seems great. I'm not sure if you have any thoughts on this, but (as a second step after this) it would be nice to split out the different GUI parts - so if you tapped on a message in the list in the Messages app, it could be handled by a different app.
I'm thinking something like:
/// mymessage.messagegui.js
(function(msg) { return {
handled : msg.src=="slack",
open : () => { Bangle.load("mymessage.gui.js") }
})
/// mymessage.app.js
... actually display the message here however you want it
Then the messages library (or messagesgui) can have a function that loads all of the mymessage.messagegui.js, checks if any of them want handle it, and calls those.
It's not great, but it's hard to have something that:
a) doesn't take up RAM (or extra boot time) all the time
b) allows more than one app to be installed that can handle different message types
We also do similar things for settings, recorder plugins, and clock_info so this isn't that new
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.
Only just saw this - I made some comments on the PR though: https://github.com/espruino/BangleApps/pull/2297
This seems great. I'm not sure if you have any thoughts on this, but (as a second step after this) it would be nice to split out the different GUI parts - so if you tapped on a message in the list in the Messages app, it could be handled by a different app.
I'm thinking something like:
Then the
messages
library (ormessagesgui
) can have a function that loads all of themymessage.messagegui.js
, checks if any of them want handle it, and calls those.It's not great, but it's hard to have something that:
a) doesn't take up RAM (or extra boot time) all the time
b) allows more than one app to be installed that can handle different message types
We also do similar things for settings, recorder plugins, and clock_info so this isn't that new