Affected hardware version
Bangle 2, Bangle 1
Your firmware version
2v29.28
The bug
I'm working on a fix, but if anyone wants to beat me to it, go ahead. I'm not sure when I'll get around to finishing it.
Problem
When an SMS is received on the phone, Gadgetbridge sends it to the watch.
When the user dismisses that SMS on the phone, the watch should remove it, but it doesn't.
Debugging Notes
On the GadgetBridge side
To quote android\lib.js:
// Detect a weird GadgetBridge bug and fix it
// For some reason SMS messages send two GB notifications, with different sets of info
Gadgetbridge has two paths that fire for each incoming SMS:
-
SMSReceiver: a BroadcastReceiver for SMS_RECEIVED. Fires immediately and sends {t:"notify", id:idA, ...} to the watch. The idA ID is not tracked for removal.
-
NotificationListener: an Android NotificationListenerService. Fires when the SMS app creates its Android notification. These IDs are tracked for removal via notificationsActive and mNotificationHandleLookup.
A filter shouldIgnoreSource() is called in both onNotificationPosted() and onNotificationRemoved(). For some hardcoded SMS apps (com.android.mms, org.fossify.messages, ...), it returns true, blocking posting/removal in the NotificationListener path.
For SMS apps NOT in the hardcoded list (Google Messages, Samsung Messages), both paths fire, creating two notifications with different IDs. So the watch gets duplicate msgs.
When the user dismisses the SMS on the phone, notify- is sent with the NotificationListener's ID (idB), but the watch usually seems to store the message under SMSReceiver's ID (idA).
On the android\lib.js side
There's a workaround in android/lib.js that tried to merge duplicate SMS notifications. It's checking lastMsg.src == undefined, which no longer matches because BangleJSDeviceSupport overrides src to SMS Message for all GENERIC_SMS types.
Installed apps
No response
Affected hardware version
Bangle 2, Bangle 1
Your firmware version
2v29.28
The bug
I'm working on a fix, but if anyone wants to beat me to it, go ahead. I'm not sure when I'll get around to finishing it.
Problem
When an SMS is received on the phone, Gadgetbridge sends it to the watch.
When the user dismisses that SMS on the phone, the watch should remove it, but it doesn't.
Debugging Notes
On the GadgetBridge side
To quote
android\lib.js:Gadgetbridge has two paths that fire for each incoming SMS:
SMSReceiver: a
BroadcastReceiverforSMS_RECEIVED. Fires immediately and sends{t:"notify", id:idA, ...}to the watch. TheidAID is not tracked for removal.NotificationListener: an Android
NotificationListenerService. Fires when the SMS app creates its Android notification. These IDs are tracked for removal vianotificationsActiveandmNotificationHandleLookup.A filter
shouldIgnoreSource()is called in bothonNotificationPosted()andonNotificationRemoved(). For some hardcoded SMS apps (com.android.mms, org.fossify.messages, ...), it returnstrue, blocking posting/removal in the NotificationListener path.For SMS apps NOT in the hardcoded list (Google Messages, Samsung Messages), both paths fire, creating two notifications with different IDs. So the watch gets duplicate msgs.
When the user dismisses the SMS on the phone,
notify-is sent with the NotificationListener's ID (idB), but the watch usually seems to store the message under SMSReceiver's ID (idA).On the
android\lib.jssideThere's a workaround in
android/lib.jsthat tried to merge duplicate SMS notifications. It's checkinglastMsg.src == undefined, which no longer matches becauseBangleJSDeviceSupportoverridessrctoSMS Messagefor allGENERIC_SMStypes.Installed apps
No response