element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

No notification with Pebble watch #1141

Open ylecollen opened 7 years ago

ylecollen commented 7 years ago

reported by Vurpo and Jon 😺

It seems that extra settings must be set

08:49:04.639 [Binder_2] INFO n.f.g.e.NotificationListener - Processing notification from source im.vector.alpha with flags: 512

08:49:04.641 [Binder_2] INFO n.f.g.e.NotificationListener - Not forwarding notification, FLAG_GROUP_SUMMARY is set and no wearable action present. Notification flags: 512

ylecollen commented 7 years ago

Reported by Vurpo

It seems like the notifications I get from Telegram (for comparison) have some sort of "wearable action": 09:05:40.058 [Binder_2] INFO n.f.g.e.NotificationListener - Processing notification from source org.telegram.messenger with flags: 16

09:05:40.073 [Binder_2] INFO n.f.g.e.NotificationListener - found wearable action: Reply to hackbot null

ylecollen commented 7 years ago

https://developer.android.com/training/wearables/notifications/creating.html

tradej commented 6 years ago

+1 on this. Multiple users and wearables are affected by this (see the linked bug above). Thank you.

edam commented 6 years ago

FWIW, notifications used to work, with basic system notifications being sent to wearables. They stopped working around riot 0.8.1 (f-droid), although whether this was due to a riot change or an android/wear os change is unclear.

eras commented 6 years ago

It seems the linked issue explains everything, but in the off-chance it doesn't, here's a system where it seems to work:

Apparently it was fixed with 0.8.5, as I have a confirmation of it not working with 0.8.4 but working after updating to 0.8.5.

tradej commented 6 years ago

Notifications still do not work on Mi Band 2 (using GadgetBridge).

tradej commented 6 years ago

I have done some digging and it seems like what's necessary is to add a NotificationCompat.WearableExtender instance to the notification that extends the notification when it's built. This instance should have an action added on it, which is what GadgetBridge processes.

I've looked at Telegram, and they seem to do it this way:

Can a developer please have a look at this? I've only got basic Java skills and I'm quite lost in the code base. Thank you very much.

h3ndrik commented 6 years ago

There is some code in NotificationUtils.kt which seems to add the wearableExtender at least in one case here:

https://github.com/vector-im/riot-android/blob/3a650e15fe4edd79b1f5326f95fba312dad168f7/vector/src/main/java/im/vector/notifications/NotificationUtils.kt#L512

h3ndrik commented 5 years ago

issue seems to be fixed (or worked-around) in Gadgetbridge 0.31.0.

swedneck commented 5 years ago

I can also confirm that the gadgetbridge update makes it work!