2013-09-24 13:14:34 +01:00
|
|
|
|
|
|
|
This plugin listens to packages with type "kdeconnect.notification" that will
|
|
|
|
contain all the information of the other device notifications.
|
|
|
|
|
|
|
|
The other device will report us every notification that is created or dismissed,
|
|
|
|
so we can keep in sync a local list of notifications.
|
|
|
|
|
|
|
|
At the beginning we can request the already existing notifications by sending a
|
|
|
|
package with the boolean "request" set to true.
|
|
|
|
|
|
|
|
The received packages will contain the following fields:
|
|
|
|
|
|
|
|
"id" (string): A unique notification id.
|
|
|
|
"appName" (string): The app that generated the notification
|
2018-06-30 22:04:30 +01:00
|
|
|
"ticker" (string): The title or headline of the notification, for compatibility with older Android versions.
|
2013-09-24 13:14:34 +01:00
|
|
|
"isClearable" (boolean): True if we can request to dismiss the notification.
|
|
|
|
"isCancel" (boolean): True if the notification was dismissed in the peer device.
|
2018-06-30 22:04:30 +01:00
|
|
|
"title" (string): The title of the notification.
|
|
|
|
"text" (string): The text/content of the notification.
|
|
|
|
"requestReplyId" (string): Used to reply to messages.
|
2023-03-31 20:00:48 +01:00
|
|
|
"silent" (bool): Don't show a notification popup for this notification.
|
2013-09-24 13:14:34 +01:00
|
|
|
|
|
|
|
Additionally the package can contain a payload with the icon of the notification
|
2018-06-30 22:04:30 +01:00
|
|
|
in PNG format. If there another field will be present:
|
|
|
|
|
|
|
|
"payloadHash" (string): MD5 hash of the payload. Used as a filename to store the payload.
|
2013-09-24 13:14:34 +01:00
|
|
|
|
|
|
|
The content of these fields is used to display the notifications to the user.
|
2018-06-30 22:04:30 +01:00
|
|
|
Note that if we receive a second notification with the same "id", the existing notification is updated.
|
2013-09-24 13:14:34 +01:00
|
|
|
|
|
|
|
If the user dismisses a notification from this device, we have to request the
|
|
|
|
other device to remove it. This is done by sending a package with the fields
|
|
|
|
"id" set to the id of the notification we want to dismiss and a boolean "cancel"
|
|
|
|
set to true. The other device will answer with a notification package with
|
|
|
|
"isCancel" set to true when it is dismissed.
|
|
|
|
|