[ Version ( since = "2.40" ) ]
public void send_notification (string? id, Notification notification)

Sends a notification on behalf of this to the desktop shell.

There is no guarantee that the notification is displayed immediately, or even at all.

Notifications may persist after the application exits. It will be D-Bus-activated when the notification or one of its actions is activated.

Modifying notification after this call has no effect. However, the object can be reused for a later call to this function.

id may be any string that uniquely identifies the event for the application. It does not need to be in any special format. For example, "new-message" might be appropriate for a notification about new messages.

If a previous notification was sent with the same id, it will be replaced with notification and shown again as if it was a new notification. This works even for notifications sent from a previous execution of the application, as long as id is the same string.

id may be null, but it is impossible to replace or withdraw notifications without an id.

If notification is no longer relevant, it can be withdrawn with withdraw_notification.

It is an error to call this function if this has no application ID.



a Application


id of the notification, or null


the Notification to send