Syncing notifications between multiple devices

Albert Vaca Cintora albertvaka at gmail.com
Fri Apr 5 13:15:37 BST 2024


I'm quite late, but I'm going to reply to this.

On Mon, Feb 5, 2024 at 4:29 PM Ing. Bernhard Polt, MA @ TILDE GmbH
<bepo at tilde.gmbh> wrote:
> Question A: how does the Linux plugin for "send notifications" decide
> which applications are available for selection for each device?
>
> Question B: in the Linux plugin for "send notifications": what is the
> "black list" for?

Answering both questions together. The plugin can only know
applications it has already seen once, so initially the application
list is empty. By default, however, notifications from all
applications are forwarded. The "blacklist" (we should rename that)
allows notifications for some applications to not be forwarded. For an
application to be candidate to be excluded, however,  one notification
from that app must have been seen already. Otherwise the plugin
doesn't know that that application can send notifications, because
there's no API in Linux to query that. So, after rebooting the list of
apps is empty and as notifications are received the list is populated.

Note that notifications forwarded from another device using KDE
Connect will not show as originated from the original application but
from KDE Connect instead.

Also note that setups like yours with more than two devices, although
supported, often are not tested when developing new features and might
be buggy. I'm aware that, at least for clipboard syncing, there are
bugs in such setups.

>
> Question C: in a setup which includes a Linux system, an Android phone
> and a smartwatch connected to the Android phone (for details see
> description below) - why do notifications sent with kdeconnect-cli from
> Linux using "ping" or "ping-msg" get forwarded to the smartwatch, while
> all application notifications remain on the Android phone without
> notifying the smartwatch?
>
> After lots of testing and reading and reading and testing - my guess
> is: it has something to do with the notification's "urgency", thus the
> following additional questions:

KDE Connect doesn't forward KDE Connect notifications. Urgency is a
PC-only concept so it doesn't transfer to the phone notifications.

> Question D: what is the notification urgency of a "ping" or "ping-msg"
> when using kdeconnect-cli?

As said, Android doesn't have the concept of urgency. Android does
support some metadata/modificatiors, but we don't set any.

>
> Question E: is it possible to change the notification urgency of a
> "ping" or "ping-msg" when using kdeconnect-cli?

There's no way to configure those notifications whatsoever.

>
> Question F: on the Linux system, is it possible to "override" the
> notification urgency of an application's notifications with a selected
> value?

No, that's set by the app that sends the notification.

>
> Question G: on Android with multiple users - where each user is running
> KDE connect app simultaneously (see description below) - why does the
> currently logged-in user NOT get a notification from the Linux system,
> while the user "in the background" does receive the notification?
> (further clarification: this behaviour does not depend on whether the
> user is a privileged main-user or a sub-user with certain restraints:
> when logged-in as main-user then the sub-user receives the
> notification, when logged-in as sub-user then the main-user receives
> the notification)

I've never tested on multi-user Android devices. My expectation is
that the user running KDE Connect receives the notifications, but it
might be buggy as it's not been tested.

>
> Question H: video-playback-control across devices is awesome -
> especially as it even works from my Pixel Watch 2 (see description
> below)! In the Android app, it's great that it's even possible to
> switch between players when one device is running multiple players
> simultaneously.
> Having the playback-control on the notifications-screen is very handy.
> Unfortunately, I didn't find a way to choose between different active
> players here. Instead of just displaying one distinct playback-control
> here (I guess it's usually the one which was startet earliest, but
> didn't test in detail yet), is it possible to show one tile for each
> playback? Possibly even grouped by device?

We only propagate the last selected player to the "media
notification". That notification is provided by Android, so we can't
add custom controls to it like a media player selector. It would be
nice to allow switching, but I'm not sure how we could achieve that
since, as mentioned, we have no control over that media notification.
My assumption is that, since that's a standard Android notification,
they have implemented mirroring it into the smartwatch. This wouldn't
be possible for custom notifications, so that's not an option. We
could add an interface for smartwatches, so that KDE Connect can be
used from the watch when installed on the phone. One thing we could
add to that watch interface could be a player selector. I don't have a
smartwatch to develop or test that myself, but I think this is doable
and if someone else wants to develop it I would be happy to accept
such a patch.


More information about the KDEConnect mailing list