digitalcircuit
Member since Dec 2022 • Last active Apr 2024Most recent activity
-
- 9 comments
- 630 views
-
AntennaPod does support notification channels, but I don't see a way to hide a specific notification channels in Gadgetbridge.
However, I now see that there is a way to filter on specific words in the notification, which I had not noticed and likely can work around this issue. (Ideally, Gadgetbridge itself would be fixed, but if that's too complicated I'd understand.)
-
Noted! I didn't realize the watch could update Gadgetbridge's settings, that's rather handy. (I initially avoided this as I didn't want to have two separate collections of notification ignoring settings.)
And sure thing! I understand this is a high risk area to mess with, and I'll keep an eye out for any other apps that trigger this issue.
(I am surprised that the LineageOS system updater does not cause this given it frequently posts notification updates on download/installation progress. A quick glance at the source code doesn't find any
setLocalOnly()
calls.) -
Sure thing! Your musings make sense. I haven't looked into Gadgetbridge's handling yet, but if I notice anything in potential future code-spelunkings, I'll let you know.
And, nah, I don't need AntennaPod notifications. It'd merely be nice to have, and I figured this might impact other folks too so I should report an issue. I had considered toggling the app off in Gadgetbridge then changing it to handle media notifications before the app blocklist; I'm glad to know the watch option handles similarly.
-
Yeah, that's actually what I suggested to the AntennaPod devs on GitHub - specifying "setLocalOnly(true)" on the download and service notifications.
The counterpoint I was given is that folks may want to see download progress on other devices. And with
setAlertOnlyOnce(true)
as documented on the page you linked to, presumably Gadgetbridge and/or Bangle.js should not be repeatedly showing the notification, only updating it.From what I can tell, AntennaPod does reuse the notification ID to update the notification (rather than deleting and recreating)…
There is
updateNotifications()
, which is called byNotificationUpdater
which specifies a fixed notification ID:private class NotificationUpdater implements Runnable { public void run() { Notification n = notificationManager.updateNotifications(downloads); if (n != null) { NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nm.notify(R.id.notification_downloading, n); } } }
(This notification ID and others are defined in the resources.)
Based on code elsewhere in the same file, this notification is updated once a second:
/** * Schedules the notification updater task if it hasn't been scheduled yet. */ private void setupNotificationUpdaterIfNecessary() { if (notificationUpdater == null) { Log.d(TAG, "Setting up notification updater"); notificationUpdater = new NotificationUpdater(); notificationUpdaterFuture = notificationUpdateExecutor .scheduleAtFixedRate(notificationUpdater, 1, 1, TimeUnit.SECONDS); } }
-
I've run into two possibly-related issues with the handling of notifications for AntennaPod:
Playing any episode, pausing, then resuming after a minute or so results in a
Loading. If this does not go away, play any episode and contact us.
notification showing on Bangle.js, however my phone never shows this notification- That notification does not go away without me actually deleting the message from the Message GUI
- That notification does not go away without me actually deleting the message from the Message GUI
Refreshing podcasts and downloading episodes result in the watch buzzing for every percentage change despite AntennaPod specifying
setOnlyAlertOnce()
- In the process, my Bangle.js 2 bogs down with processing and can take 15-30 seconds to stop vibrating once AntennaPod has finished and the notification is gone from my phone
- Android 12+ hides the download/refresh notification for 10 seconds - when testing, make sure the download/refresh takes longer
- In the process, my Bangle.js 2 bogs down with processing and can take 15-30 seconds to stop vibrating once AntennaPod has finished and the notification is gone from my phone
I tried filing an issue on AntennaPod's repository, suggesting that download notifications should not be forwarded to wearables, but the developer responded saying some folks may expect download notifications, which I s'pose makes sense - e.g. if you have a slow download, you could monitor it from your watch/computer via KDE Connect/etc.
I'm not sure if this is a Gadgetbridge problem, a Bangle.js problem, or something else…?
Device details
- Pixel 4 XL (LineageOS 20 + GApps, Gadgetbridge 0.74.0-banglejs)
- Bangle.js 2 (firmware 2v18)
Apps:
antonclk (0.11), gpsautotime (0.04), locale (0.17), launch (0.20), about (0.14), clkinfosunrise (0.03), widlock (0.08), agpsdata (0.06), circlesclock (0.25), info (0.03), qcenter (0.04), messageicons (0.05), widbat (0.11), weather (0.25), sched (0.22), widminbt (0.01), alarm (0.41), health (0.23), widmessages (0.05), widalarmeta (0.10), owmweather (0.03), loadingscreen (0.01), kbswipe (0.08), notify (0.13), boot (0.58), setting (0.61), messages (0.60), mylocation (0.10), clock_info (0.06), android (0.29), rescalc (0.03), messagegui (0.73), multitimer (0.04), agenda (0.14), quicklaunch (0.15)
-
UPDATE: fetching Gadgetbridge debug logs, I see… nothing from Sleep as Android in Gadgetbridge's logs.
I have my custom code snippet from Tasker successfully shown and parsed, though.
Perhaps there's something between Bangle.js Gadgetbridge and Sleep as Android that needs fixed?
I do frequently see the following, but I suspect it's unrelated:
[JCould not load clock info "sched.clkinfo.js"
Looking at
adb logcat
, it seems like Sleep as Android is listening for acom.urbandroid.sleep.watch.CONFIRM_CONNECTED
broadcast:03-22 16:23:56.110 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.110, main]: Theme: setting last SmartWatchActivity 16 03-22 16:23:56.110 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.110, main]: SmartWatchActivity:onCreate() {EX:null} [I: {EX:test_sensors (true) }] 03-22 16:23:56.122 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.122, main]: onCreate SmartWatchActivity wearable Bangle.js 03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SmartWatchActivity:Async connecting smart watch 03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SmartWatch: Async smart watch connect called 03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SleepPhaser: GET address null 03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SleepMaskBt: GET address null 03-22 16:23:56.124 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.124, main]: Using watch accel: BaseWatchAccelManager 03-22 16:23:56.124 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.124, main]: SmartWatch: ConnectivityChecker registering receiver for com.urbandroid.sleep.watch.CONFIRM_CONNECTED watch com.urbandroid.sleep.smartwatch.generic.GenericWatch@6946671 […] 03-22 16:23:56.131 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.131, main]: SmartWatchActivity:onStart() 03-22 16:23:56.132 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.132, main]: SmartWatchActivity:onResume() 03-22 16:23:56.133 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.133, main]: Theme: onPostResume() SmartWatchActivity 03-22 16:23:56.138 1810 4994 D CoreBackPreview: Window{d471394 u0 com.urbandroid.sleep/com.urbandroid.sleep.SmartWatchActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@3722632, mPriority=0} 03-22 16:23:56.145 20919 29298 E OpenGLRenderer: Unable to match the desired swap behavior. 03-22 16:23:56.152 20919 29298 W Parcel : Expecting binder but got null! 03-22 16:23:56.167 1810 1933 I ActivityTaskManager: Displayed com.urbandroid.sleep/.SmartWatchActivity: +81ms 03-22 16:23:56.234 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.233, main]: Theme: onPostResumeAfterRecreate() […] 03-22 16:23:56.747 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.747, main]: AlarmClock:onStop() 03-22 16:23:56.752 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.752, main]: SimpleSettingsActivity:onStop() 03-22 16:23:56.753 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.753, main]: TrackSettingsActivity:onStop() 03-22 16:23:56.754 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.754, main]: SmartwatchSettingsActivity:onStop()
This matches up with the Sleep as Android Wearable integration API documentation:
https://docs.sleep.urbandroid.org/devs/wearable_api.html#initiating-connection-to-phoneI git-clone'd the Gadgetbridge source code and searched recursively for
CONFIRM_CONNECTED
, but didn't find it anywhere. -
I'm glad to know it's not just me :)
My guess is the Sleep as Android app is sending JS code to the Bangle.js 2 watch via the Bangle.js Gadgetbridge app, and expecting some sort of reply (perhaps via Android Intents?) that it doesn't receive.
I'll try to look into the Gadgetbridge debugging advice soon. You might be able to find something with it, too?
https://www.espruino.com/Gadgetbridge#debugging
Someone has stepped up to work on Sleep as Android support in Gadgetbridge!
https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3188
It looks like they are focusing on the Mi Band (based on the PR branch name), but this could potentially be used as the foundation for Bangle.js 2 support, too.