Only some notifications being synced with AsteroidOSSync
I am thrilled to get phone notifications on the watch, finally. So now we move on to the problem of getting all the relevant notifications on the watch. To wit, on a Pixel XL running stock Q, paired to a harmony watch using AsteroidOsSync 0.17:
-
Some apps, like Gmail, will display the first notification of a new message, but won't display any subsequent new mail messages. This might be a similar condition to #35, but with a different app. I do know that the phone displays a grouping of notifications in Gmail when the second one comes through, so if it's whatever the phone does that creates the grouped notification that's the problem, then at least I know which apps will only give me one instead of many.
-
For Messaging, whether through SMS or MMS or otherwise, I get no notifications at all on the watch. I see Messaging as part of the programs to display for, and I have it set to "default", but none of the messages that come through there display on the watch, nor are they cached on the watch to review later. (This might also be related to whatever is going on in #35, for all I know.)
-
I don't see an option for persistent notifications to be displayed on the watch. Does that mean that #54 is still an enhancement request at this time, and not actually present? It's fine if it is, but I'm trying to figure out what its status is so that I can avoid asking silly questions.
The watch is working almost for all the things I would like it to work for, so hopefully there's a useful solution somewhere, or there are some things that I can do to help diagnose what's going weird with my watch and/or phone.
1.
• Maybe grouped notifications are the issue here. We don't send notifications for GroupSummaries but according to the documentation, this should not be actual content. Maybe the documentation is unclear and/or a few apps use the flag wrong.
https://github.com/AsteroidOS/AsteroidOSSync/blob/da9df76c2e7babc5babb5b68b9e2e1959c35b358/app/src/main/java/org/asteroidos/sync/services/NLService.java#L163
•Another option would be that the notifications have the localOnly flag.
• It could also be that the notifications are below the default priority. Although that would be strange for emails.
2.
I use Signal as my SMS app and the stock app is the AOSP variant so I can not really test that with the stock pixel app. It would be interesting to know the notification flags. Any chance you can get them? With ADB you can dump the currently displayed notifications:
adb shell dumpsys notification --noredact
Or you can use the graphical "Notification log". You can open that via adb:
adb shell am start -n 'com.android.settings/.Settings\$NotificationStationActivity'
After opening the "Notification log" you can tap an entry to reveal the intent extras of the given notification.
3.
Nothing has changed for #54. Currently, only Apps that are included in a specific string array are allowed. Maybe we should add a checkbox for each app like "allow ongoing notifications".
For both 1 and 2, I have a dump of notifcations across ADB. What would I be looking for that would be the most helpful at puzzling out what is going on? The spaces where I see "flags" in the messages have hexadecimal values attached to them, it looks like, some with 0x800, some 0x18, and some 0x218. Fun times!
I checked the notifications on the watch against what I have on the phone, and on the watch, there's one Gmail out of many messages, zero for Discord (which had several messages in a single channel), zero for Hangouts (several messages across different channels), and zero for Messages. (several messages waiting from different sources.)
For 3, that would be very helpful. I'm fairly certain that more than just Maps would be a useful thing for people to have ongoing notifications for. Assuming it wouldn't be too terrible to implement and make work.
1. / 2.
Sorry, I should have clarified what flags (notification constants) I meant. Since we are looking for a pattern it would be great to have the whole dump, but there is potential personal information in there so I'm looking mainly for the following:
- channelID
- group
- priority
- importance
- flags
- extras
- It would be great to get a list of all extras of these notifications
You can use adb shell dumpsys notification (without the --noredact) to get a redacted version starting with Android 6.
3.
Implementation should be fairly simple. It's just not very high on my priority list tbh. If you know how to do it, PRs are always welcome.
Regrettably, when it comes to actual coding, I'm the user that asks questions but doesn't understand the underlying systems nearly well enough to think about how to code any sort of PR and see if it works. So I'm content to wait until the priority list, or someone else, gets to it, and hopefully not sound like someone who is impatiently demanding other people do things on my schedule. No worries, I'd rather concentrate on getting all my notifications to come through on the watch.
I think I've managed to get a pass through the unredacted form and scratch out any names, e-mail addresses, or message contents that I wouldn't want getting out. If there's other identifying material in the numbers and the configs, then I'm not smart enough to notice it.
How would you like to get that log file, then?
You can post it in a GitHub gist or if you are not sure if there is something identifying in there you can send me an email: github-sync-issue111 [at] jrtberlin [.] de
You should be receiving an e-mail shortly, then, on the matter. Hopefully it has the information you are looking for.
From the first look at it, I don't see anything in your notification log that should result in no notification being synced for Gmail. I have tested Gmail with three emails. The first, the second, and the third message are displayed correctly on the watch. They are both a part of the same NotificationGroup. On Setup Gmail asked me tho if Gmail should decide on the importance of the notifications. If that is checked maybe Gmail sets a below default importance and they get therefore ignored by AsteroidOS Sync but your log does imply that all notifications for Gmail should be displayed. So I have no idea why they shouldn't be displayed properly and I can't reproduce the issue.
For Hangouts, I see in your log that only the NotificationGroup has IMPORTANCE_HIGH (we don't sync the group notification) but the Notifications within that group have IMPORTANCE_LOW which is below IMPORTANCE_DEFAULT
You should be able to change the priority for NotificationsChannels within the notification settings of Android 10.
I also checked Discord and tried to reproduce the issue. I got all messages on the watch that were appearing in the notification list on the phone.
Do you have Do-Not-Disturb activated? Maybe DND behaves differently on Android 10 than on prior versions.
There aren't specific priority levels settable in Android Q, not from the notifications settings. There are parts and pieces that can be set with sliders, but there's no explicit priority setting to change. As best I can tell in the notification settings, everything is set to signal, and it should signal both phone and watch.
I do have a DND setting, but it's only set for evenings when I would be asleep. It shouldn't be affecting things that happen during the day, which is when I would be using the watch and getting notifications.
It does seem to be related to apps that update their notifications and then group them, as the apps on the phone that send single messages repeatedly all come through just fine. Maybe the watch isn't catching the update correctly and sending the new notification to the watch.
I hate for this to be not reproducible, but if that's what it ends up being, then it's probably a quirk of phone and watch together in some way that I don't understand.
Sorry, I thought there is more granular control for notification behavior.
It does seem to be related to apps that update their notifications and then group them
Mhh the group should not change that as the exclusion is only for the group summary.
For all active notifications, we trigger onNotificationPosted() including updates and send them to the watch. We also have onNotificationRemoved() which sends a remove request to the watch.
Reading #35 and AsteroidOS/asteroid-btsyncd#14 again this seems to be the same issue you are experiencing.
Ah, sorry. Didn't mean to duplicate an already open issue. If there are additional logs I can provide, I'll do what I can, but I guess I'm caught in the same problem as the others.