Mark notification messages as read
#695
Open
opened 6 years ago by foosinn
·
27 comments
No Branch/Tag Specified
nightly-branch
master
arjan5-testing-branch
fix_supported_unsupported_discovery
osmand-experiments
soflow_so6
remove-duplicated-empty-methods
nightly-changelog
huami-reserved-calendar-reminders
sony-fixes
sony-linkbuds-s
supercars_blinking
device-update-reason
discover-freeze-fix
device-flipper-zero
test_link
test_debug_release
debug-branch
fossil-hr-gen6
test_own_image
fix_logger_again
streaks
huami-sms-reply
RemoveMibandGlobalPreferences
SystemEvents
combined
openTracksObserver-debug
cycling_sensor
multi-device-support-clean-2
miband6-alipay
fossil-hr-activity-fix
fossil-q-hr-html
dakhnod/fix-notification-removed
dakhnod/beautify-device-information
Lightwars/TurnClocksForward
andyboeh/ble_reconnect_scan
ildar/patches/circleci
mvallerie/custom_menu_miband2
christian-n/master
lucasgaley/master
Dikay900/steps_diagram
comradekingu/patch-3
elagin/sleep_values_on_chart
boun/runnerup
thePanz/add-raw-data-support
plugdio/master
atx/master
Vebryn/csv-export
rosenpin/master
lazarosfs/EnableBtOnConnect
health-new-database
mi2-text-notifications
polarm400
release-0.11.x
led-profile
live-sensor-data
0.1.0
0.1.1
0.1.2
0.1.3
0.1.4
0.1.5
0.10.0
0.10.1
0.10.2
0.11.0
0.11.1
0.11.2
0.12.2
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.13.6
0.13.7
0.13.8
0.13.9
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.15.0
0.15.1
0.15.2
0.16.0
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
0.18.0
0.18.1
0.18.2
0.18.3
0.18.4
0.18.5
0.19.0
0.19.1
0.19.2
0.19.3
0.19.4
0.2.0
0.20.0
0.20.1
0.20.2
0.21.0
0.21.1
0.21.2
0.21.3
0.21.4
0.21.5
0.21.6
0.22.0
0.22.1
0.22.2
0.22.3
0.22.4
0.22.5
0.23.0
0.23.1
0.23.2
0.24.0
0.24.1
0.24.2
0.24.3
0.24.4
0.24.5
0.24.6
0.25.0
0.25.1
0.26.0
0.26.1
0.26.2
0.26.3
0.26.4
0.26.5
0.27.0
0.27.1
0.28.0
0.28.1
0.29.0
0.29.1
0.3.0
0.3.1
0.3.2
0.3.3
0.3.4
0.3.5
0.30.0
0.31.0
0.31.1
0.31.2
0.31.3
0.32.0
0.32.1
0.32.2
0.32.3
0.32.4
0.33.0
0.33.1
0.34.0
0.34.1
0.35.0
0.35.1
0.35.2
0.36.0
0.36.1
0.36.2
0.37.0
0.37.1
0.38.0
0.39.0
0.39.1
0.4.0
0.4.1
0.4.2
0.4.3
0.4.4
0.4.5
0.4.6
0.40.0
0.40.1
0.41.0
0.41.1
0.42.0
0.42.1
0.43.0
0.43.1
0.43.2
0.43.3
0.44.0
0.44.1
0.44.2
0.45.0
0.45.1
0.46.0
0.47.0
0.47.1
0.47.2
0.48.0
0.49.0
0.5.0
0.5.1
0.5.2
0.5.3
0.5.4
0.50.0
0.51.0
0.52.0
0.53.0
0.54.0
0.54.1
0.55.0
0.56.0
0.56.1
0.56.2
0.57.0
0.57.1
0.58.0
0.58.1
0.58.2
0.59.0
0.59.1
0.59.2
0.59.3
0.6.0
0.6.1
0.6.2
0.6.3
0.6.4
0.6.5
0.6.6
0.6.7
0.6.8
0.6.9
0.60.0
0.61.0
0.62.0
0.63.0
0.63.1
0.64.0
0.65.0
0.66.0
0.67.0
0.67.1
0.68.0
0.69.0
0.7.0
0.7.1
0.7.2
0.7.3
0.7.4
0.70.0
0.71.0
0.71.1
0.71.2
0.71.3
0.72.0
0.8.0
0.8.1
0.8.2
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
Labels
Mi Band 7 activity post processing
activity data processing, import, export activity/health Android 12 Android 13 android integrations architecture Bangle.js bug changes requested
the provided PR needs some modifications charts developer documentation
Information for contributors device amazfit band 5
Amazfit Band 5 device amazfit bip device amazfit cor device Casio device fossil device gtr 2e device gts 2 mini device h30 device hplus device Huawei
Huawei honor device liveview device mi band device mi band 2 device mi band 3 device mi band 4 device mi band 5
Mi Smart Band 5 device mi band 6
Mi Smart Band 6 device no.1 f1 device pace device pebble device pebble 2 device pinetime infinitime device request device sony
Sony device support device watch 9 discussion documentation duplicate enhancement feature request Gadgetbridge
Gadgetbridge good first issue
good entry level issue for new contributors help wanted i am developing my own app can you help
no, sorry icebox
An icebox for abandoned PRs. Feel free to pick it up, update and make a new PR internationalisation
metric/imperial/celsius/fahrentheit... invalid needs work network companion app
ideas pool for a network enabled companion app no feedback not a bug notifications
ideas and improvements for notifications one of the 1000 issues about disconnection pairing/connecting potentially fixed / confirm and close question research security seems abandoned
PR seems to abandoned Solved, waiting for F-Droid release suggest to close
probably should/could close task user interface / UX weather wontfix Zepp OS
Apply labels
Clear labels
device mi band 7
Mi Band 7 activity post processing
activity data processing, import, export activity/health Android 12 Android 13 android integrations architecture Bangle.js bug changes requested
the provided PR needs some modifications charts developer documentation
Information for contributors device amazfit band 5
Amazfit Band 5 device amazfit bip device amazfit cor device Casio device fossil device gtr 2e device gts 2 mini device h30 device hplus device Huawei
Huawei honor device liveview device mi band device mi band 2 device mi band 3 device mi band 4 device mi band 5
Mi Smart Band 5 device mi band 6
Mi Smart Band 6 device no.1 f1 device pace device pebble device pebble 2 device pinetime infinitime device request device sony
Sony device support device watch 9 discussion documentation duplicate enhancement feature request Gadgetbridge
Gadgetbridge good first issue
good entry level issue for new contributors help wanted i am developing my own app can you help
no, sorry icebox
An icebox for abandoned PRs. Feel free to pick it up, update and make a new PR internationalisation
metric/imperial/celsius/fahrentheit... invalid needs work network companion app
ideas pool for a network enabled companion app no feedback not a bug notifications
ideas and improvements for notifications one of the 1000 issues about disconnection pairing/connecting potentially fixed / confirm and close question research security seems abandoned
PR seems to abandoned Solved, waiting for F-Droid release suggest to close
probably should/could close task user interface / UX weather wontfix Zepp OS
No Label
device mi band 7
activity post processing
activity/health
Android 12
Android 13
android integrations
architecture
Bangle.js
bug
changes requested
charts
developer documentation
device amazfit band 5
device amazfit bip
device amazfit cor
device Casio
device fossil
device gtr 2e
device gts 2 mini
device h30
device hplus
device Huawei
device liveview
device mi band
device mi band 2
device mi band 3
device mi band 4
device mi band 5
device mi band 6
device no.1 f1
device pace
device pebble
device pebble 2
device pinetime infinitime
device request
device sony
device support
device watch 9
discussion
documentation
duplicate
enhancement
feature request
Gadgetbridge
good first issue
help wanted
i am developing my own app can you help
icebox
internationalisation
invalid
needs work
network companion app
no feedback
not a bug
notifications
one of the 1000 issues about disconnection
pairing/connecting
potentially fixed / confirm and close
question
research
security
seems abandoned
Solved, waiting for F-Droid release
suggest to close
task
user interface / UX
weather
wontfix
Zepp OS
Milestone
Set milestone
Clear milestone
No items
No Milestone
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: Freeyourgadget/Gadgetbridge#695
Reference in new issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Dismissed notifications on the Pebble seems to not mark them as read in the conversation. The stock Pebble app seems to be able to do this. Also the long-press middle button to dismiss does not work.
I tested this with Whatsapp and K9.
Your wearable device is: Pebble Time Steel
Your android version is: 7.1.2 Linageos without GAPPS
Your Gadgetbridge version is: 0.19.2
Must be specific to your setup – works fine here with Pebble Time Steel, GB and K9 (cannot speak for WA, as I don't use that), just tried it out to verify. Difference here: not Lineage, but I'm still on CyanogenMod. No GApps either (I'm using microG).
did a quick retest. Still the notifications go away, but the messages are not marked as read.
I'm running firmware 4.3 on the pebble. I only have "enable untested features" enabled, nothing else.
I do not have microG. May that required?
For me they do not even get dismissed from the notifications menu on the phone
@foosinn Sorry, I obviously misunderstood you. Messages are not marked read here either, it's just the notification on the Android device that gets dismissed along. Not sure if "mark read" is implemented at all with GB.
@IzzySoft may it sould be implemented as a new action "mark read"?
It would also be great if wie could assing either "mark read" or "dismiss" to long-press middle button.
@foosinn both nice ideas (though to be useful to me personally, I must be able to define that per app). I'm only an enthusiast user of GB, the decision on this must be left to the team 😸
I wasn't aware of the long-press-middle-button-to-dismiss feature, that one looks interesting to me. I will also take a look at the mark-read feature, as long as it's not app-specific I think it could be done.
Don't waste your time I tried to implement it.
Nougat does not allow of one app to dismiss notifications of another. Also for whatsapp and viber you have to acrually open the app to mark them as read
@lazarosfs thanks for looking into it. I am able to do this with the Pebble app and Andorid 7.1.1. Maybe there is a way?
I have installed Lineageos with Nanomod (no login to Google, no Android Wear)
I am pretty sure it is possible for apps having a notificationlistener service (like we do)
Its definitely possible. The Pebble app does it. The Android Wear app does it.
I have tried different approaches only thing I managed was to clear my own notifications.
Read herehttps://stackoverflow.com/questions/2665634/how-to-clear-a-notification-in-android
I wanted to add an option to gb to auto clear notifications.
I dont know if it can be done through the accessibility manager permissions.
Either way I still believe that at best you will clear the notification but you wont be able to mark as read because you have to call the notifications intent and open the app to do that
If I remember right, Tasker can do this if you give it notification access in the accessibility settings. I think Pebble had a similar setup, but its been a while since I had that app.
Let's not make confusion.
We are dismissing notifications since forever, the issue is about marking messages as read in the emitting application.
But its never dismissed a notification for me ever
@gappleto97 then you are experiencing a bug and I kindly ask you to open a separate issue, providing all the information requested in the template.
So my current understanding of the issue is:
My main question is ui-wise:
I would like clear and mark notifications for mi band 2. Maybe it should move to general section
You could check the dismissal in the pebble code for inspiration but yes, I'd say it's better to open a new issue if you intend to add support for dismissal with other devices!
I did try the pebble code but in my miui marshmallow it only clears gadgetbridge notifications.
I have solved this for mi band 2.
Basically it is a different option than the one implemented for the pebble.
The existing gb code dismisses notifications from the pebble when cleared from android while I wanted to implement clearing notifications from android if mi band 2 receives them.
I added an option on the Mi band settings and code to MiBand2Support and NotificationListener for that to happen. After lollipop you have to cancel notifications by supplying the key, and that is basically enough if you keep a list of notification keys and you can dismiss other app notifications without problem.
In my code I check if the mi band2 is connected and will be notified and after that I clear the notification from the phone if the option is enabled.
Sorry I don't have time to create branches and upload sources, if anyone is interested my sources are
link removed (it is not ok to copy or take the code unless the author adds it to the repository. This could expose the project to long term troubles related to IP rights).
@lazarosfs I'm sorry you didn't find the code I was referring to, but please hold on from spreading false information that could yield to long-term misunderstandings.
The pebble is able to dismiss android notifications on the (android) device, when the user chooses "dismiss" on the watch. This is correctly listed in the readme. The dismissal is a normal GBDeviceEvent. See for instance this part of the code
Not having pebble made it a bit difficult to clear this but thanks.
Same option then for miband2 implemented.
Can confirm long-press-to-dismiss exists on Pebble native (Pebble Time, FW v4.3), and that it will dismiss the notification from the Android device as well.
I am not aware of any mark-read mechanism through long-press on any app, and I haven't found a way to do it without it being a context item.
I'll look a bit into this and see if I can figure out how the Pebble app does this. Might take a while, the code is definitely pretty hard to work with at times.
I would have assumed that the hold-on-middle-button is a watch action that just sends a dismiss command to the client, but I guess not. This is going to be interesting, isn't it?
Mark read is available for me in signal and in conversations. Although I need to double check if the option is available when multiple "threads" are added to the same notification.
Personally, I'd say that we shouldn't add mark-read as an automatic thing (that is, if the app even supports it) on dismissal. I haven't seen the native Pebble app do that, and it's sort of a bad design practice as well.
For example, say I'm going for a run and I get a notification that I got some important email. I dismiss the notification on my watch (and thereby my phone). I'm aware that there's an e-mail, but I don't have time to read it right now. Instead whenever I get back to my computer, I'm going to open my email app and then find that unread e-mail.
By all means, show it as a context option when available (so when the app allows it), but we shouldn't do it for the user. Dismissing and marking read should be two separate actions.
Still looking at how long-press-to-dismiss is implemented, because it's honestly making no sense right now or last night.
It's on long press and in the context menu on the original Pebble app. If Gadgetbridge would mimic that behavior there wont be a change to the current default action.