2021-10-22 10:47:23 +00:00
|
|
|
# Messages app
|
|
|
|
|
|
|
|
This app handles the display of messages and message notifications. It stores
|
|
|
|
a list of currently received messages and allows them to be listed, viewed,
|
|
|
|
and responded to.
|
|
|
|
|
|
|
|
It is a replacement for the old `notify`/`gadgetbridge` apps.
|
|
|
|
|
2021-12-06 14:27:11 +00:00
|
|
|
## Settings
|
|
|
|
|
|
|
|
You can change settings by going to the global `Settings` app, then `App Settings`
|
|
|
|
and `Messages`:
|
|
|
|
|
|
|
|
* `Vibrate` - This is the pattern of buzzes that should be made when a new message is received
|
2022-06-28 10:43:25 +00:00
|
|
|
* `Vibrate for calls` - This is the pattern of buzzes that should be made when an incoming call is received
|
2021-12-06 14:27:11 +00:00
|
|
|
* `Repeat` - How often should buzzes repeat - the default of 4 means the Bangle will buzz every 4 seconds
|
2022-07-15 11:10:52 +00:00
|
|
|
* `Vibrate Timer` - When a new message is received when in a non-clock app, we display the message icon and
|
|
|
|
buzz every `Repeat` seconds. This is how long we continue to do that.
|
|
|
|
* `Unread Timer` - When a new message is received when showing the clock we go into the Messages app.
|
2021-12-06 14:27:11 +00:00
|
|
|
If there is no user input for this amount of time then the app will exit and return
|
2021-12-13 13:21:06 +00:00
|
|
|
to the clock where a ringing bell will be shown in the Widget bar.
|
2022-03-07 21:46:57 +00:00
|
|
|
* `Min Font` - The minimum font size used when displaying messages on the screen. A bigger font
|
2022-02-23 10:44:48 +00:00
|
|
|
is chosen if there isn't much message text, but this specifies the smallest the font should get before
|
|
|
|
it starts getting clipped.
|
2022-03-07 21:46:57 +00:00
|
|
|
* `Auto-Open Music` - Should the app automatically open when the phone starts playing music?
|
2022-03-28 20:10:29 +00:00
|
|
|
* `Unlock Watch` - Should the app unlock the watch when a new message arrives, so you can touch the buttons at the bottom of the app?
|
2022-04-06 23:30:39 +00:00
|
|
|
* `Flash Icon` - Toggle flashing of the widget icon.
|
2022-09-24 13:50:20 +00:00
|
|
|
* `Widget messages` - The maximum amount of message icons to show on the widget, or `Hide` the widget completely.
|
2021-10-22 10:47:23 +00:00
|
|
|
|
2022-02-03 14:00:48 +00:00
|
|
|
## New Messages
|
|
|
|
|
|
|
|
When a new message is received:
|
|
|
|
|
2022-06-08 04:36:36 +00:00
|
|
|
* If you're in an app, the Bangle will buzz and a message icon appears in the Widget bar. You can tap this icon to view the message.
|
2022-02-03 14:00:48 +00:00
|
|
|
* If you're in a clock, the Messages app will automatically start and show the message
|
|
|
|
|
|
|
|
When a message is shown, you'll see a screen showing the message title and text.
|
|
|
|
|
2022-02-08 10:41:56 +00:00
|
|
|
* The 'back-arrow' button (or physical button on Bangle.js 2) goes back to Messages, marking the current message as read.
|
2022-02-03 14:00:48 +00:00
|
|
|
* The top-left icon shows more options, for instance deleting the message of marking unread
|
2022-02-08 10:49:13 +00:00
|
|
|
* On Bangle.js 2 you can tap on the message body to view a scrollable version of the title and text (or can use the top-left icon + `View Message`)
|
2022-02-08 10:41:56 +00:00
|
|
|
* If shown, the 'tick' button:
|
|
|
|
* **Android** opens the notification on the phone
|
|
|
|
* **iOS** responds positively to the notification (accept call/etc)
|
|
|
|
* If shown, the 'cross' button:
|
|
|
|
* **Android** dismisses the notification on the phone
|
|
|
|
* **iOS** responds negatively to the notification (dismiss call/etc)
|
2022-02-03 14:00:48 +00:00
|
|
|
|
2021-12-14 00:34:30 +00:00
|
|
|
## Images
|
|
|
|
_1. Screenshot of a notification_
|
|
|
|
|
2021-12-14 09:07:22 +00:00
|
|
|

|
2021-12-14 00:34:30 +00:00
|
|
|
|
|
|
|
_2. What the notify icon looks like (it's touchable on Bangle.js2!)_
|
|
|
|
|
2021-12-14 09:07:22 +00:00
|
|
|

|
2021-12-14 00:34:30 +00:00
|
|
|
|
|
|
|
|
2022-09-24 12:48:59 +00:00
|
|
|
## Events (for app/widget developers)
|
|
|
|
|
|
|
|
When a new message arrives, a `"message"` event is emitted, you can listen for
|
|
|
|
it like this:
|
|
|
|
|
|
|
|
```js
|
|
|
|
myMessageListener = Bangle.on("message", (type, message)=>{
|
2022-09-24 14:17:21 +00:00
|
|
|
if (message.handled) return; // another app already handled this message
|
2022-09-24 15:08:58 +00:00
|
|
|
// <type> is one of "text", "call", "alarm", "map", "music", or "clearAll"
|
|
|
|
if (type === "clearAll") return; // not a message
|
|
|
|
// see `messages/lib.js` for possible <message> formats
|
|
|
|
// message.t could be "add", "modify" or "remove"
|
2022-09-24 12:48:59 +00:00
|
|
|
E.showMessage(`${message.title}\n${message.body}`, `${message.t} ${type} message`);
|
2022-09-24 14:17:21 +00:00
|
|
|
// You can prevent the default `message` app from loading by setting `message.handled = true`:
|
|
|
|
message.handled = true;
|
2022-09-24 12:48:59 +00:00
|
|
|
});
|
|
|
|
```
|
|
|
|
|
2021-10-22 10:47:23 +00:00
|
|
|
|
|
|
|
## Requests
|
|
|
|
|
|
|
|
Please file any issues on https://github.com/espruino/BangleApps/issues/new?title=messages%20app
|
|
|
|
|
|
|
|
## Creator
|
|
|
|
|
|
|
|
Gordon Williams
|
2021-12-14 00:34:30 +00:00
|
|
|
|
|
|
|
## Contributors
|
|
|
|
|
|
|
|
[Jeroen Peters](https://github.com/jeroenpeters1986)
|
|
|
|
|
|
|
|
## Attributions
|
|
|
|
|
|
|
|
Icons used in this app are from https://icons8.com
|