Commit Graph

10 Commits (fcc17e075edcafdb2aaa6cf3f5b8d77b5f4fa76f)

Author SHA1 Message Date
Eric Willisson c3e91b4a30 Adds support for dismissing Gadgetbridge notifications through notify app.
Most of the support was already there, so this is just a few small steps:
- notify.js gets a dismiss_and_hide() exported function that can send the "notify-" event to Gadgetbridge, if installed
- dismiss_and_hide() is called when the Bangle.js screen is touched, instead of just hide()
- Gadgetbridge's widget.js saves "notify"-type events to a variable
- Gadgetbridge's widget.js sends a DISMISS action back to the Android app on "notify-" events, using the saved event data

Note that this is a limited implementation. For example, only the most recent notfication is saved (when a new one comes in, the old one is overridden in the variable), so it will be dismissed on the phone. A more advanced implementation might make it possible to choose which notification to dismiss.

From my own testing, this does properly count as a "swipe-away" style dismiss event in Android, so apps that react to notifications being swiped away will be triggered as expected.
2021-07-09 14:56:19 -04:00
Richard de Boer 6e51c1321d notify,notifyfs: don't turn on screen during Quiet Mode 2021-03-25 23:53:51 +01:00
Gordon Williams 86d43c3fbb notify 0.07: Auto-calculate height, and pad text down even when there's no title (so it stays on-screen) 2021-03-04 10:30:23 +00:00
Gordon Williams 0e2f33d656 gbridge: 0.19: Support for call incoming/start/end 2021-02-11 09:45:50 +00:00
Gordon Williams cdf5748fa6 tweak based on sanity check 2020-09-23 08:44:42 +01:00
Gordon Williams a0b2aa30d2 Adjust position of notification src text and notifications without title 2020-09-22 09:07:27 +01:00
Richard de Boer 7bb98d38e0 notify: Update notify API for #527
Also some cleanup:
 - fall back to "src" if title is missing
 - move message-splitting into separate function
2020-07-19 21:57:49 +02:00
Richard de Boer 9c55b47263 notify/notifyfs: Add notification ID option
So you can hide a notification only if it hasn't been replaced yet.
2020-07-07 20:45:03 +02:00
Gordon Williams 8ec7878ede remove debug print 2020-06-04 15:43:20 +01:00
Gordon Williams 3c41379206 Added notification widget 2020-06-04 14:49:35 +01:00