Bangle.on("message", function(type, msg) {
if (msg.src.toLowerCase().includes("weather")) {
....do stuff here
msg.handled = true; // stop us loading the messages app or buzzing
}
});
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.
So the Bangle is getting the relevant notification sent to it, and you want to be able to grab the data out of it?
If so, absolutely! The ios app sends the message event to the messages library at https://github.com/espruino/BangleApps/blob/master/apps/ios/boot.js#L165 but the messages library sends a
message
event, so if you had an app with that did:That should work great for you