diff --git a/apps/msgwakefup/ChangeLog b/apps/msgwakefup/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/msgwakefup/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/msgwakefup/README.md b/apps/msgwakefup/README.md new file mode 100644 index 000000000..43318b9f1 --- /dev/null +++ b/apps/msgwakefup/README.md @@ -0,0 +1,19 @@ +# Message Wake On Face Up + +Temporarily activate wake on face up function when a new message is auto displayed. + +## Usage + +This is a bootloader app and only needs to be installed to add the functionality to the watch. + +## Notes + +Tried with "Message UI" app - with and without "Fastload Utils" installed. + +## Requests + +Mention @thyttan in an issue on the espruino/BangleApps repository. + +## Creator + +thyttan and Gordon Williams diff --git a/apps/msgwakefup/app.png b/apps/msgwakefup/app.png new file mode 100644 index 000000000..83d7e9add Binary files /dev/null and b/apps/msgwakefup/app.png differ diff --git a/apps/msgwakefup/boot.js b/apps/msgwakefup/boot.js new file mode 100644 index 000000000..f30de7a1b --- /dev/null +++ b/apps/msgwakefup/boot.js @@ -0,0 +1,9 @@ +// If doing regular loads, not Bangle.load, this is used: +if (global.__FILE__=="messagegui.new.js") Bangle.setOptions({wakeOnFaceUp:true}); + +// If Fastload Utils is installed this is used: +Bangle.on("message", (_, msg)=>{if (Bangle.CLOCK && msg.new) { + setTimeout(()=>{ + if (global.__FILE__=="messagegui.new.js") Bangle.setOptions({wakeOnFaceUp:true}); + },700) // It feels like there's a more elegant solution than checking the filename after 700 milliseconds. But this at least seems to work w/o sometimes activating when it shouldn't. +}}); diff --git a/apps/msgwakefup/metadata.json b/apps/msgwakefup/metadata.json new file mode 100644 index 000000000..7f97b3221 --- /dev/null +++ b/apps/msgwakefup/metadata.json @@ -0,0 +1,13 @@ +{ "id": "msgwakefup", + "name": "Message wake on face up", + "version":"0.01", + "description": "Temporarily activate wake on face up function when a new message is auto displayed.", + "icon": "app.png", + "tags": "messages,tweak", + "type": "bootloader", + "supports" : ["BANGLEJS2"], + "readme": "README.md", + "storage": [ + {"name":"msgwakefup.boot.js","url":"boot.js"} + ] +}