on

fun on(event: NotificationEvent.ACTION, listener: (event: Event<*>, index: Double) -> Unit)(source)


fun on(event: NotificationEvent.CLICK, listener: (event: Event<*>) -> Unit)(source)

Emitted when the notification is clicked by the user.


fun on(event: NotificationEvent.CLOSE, listener: (event: Event<*>) -> Unit)(source)

Emitted when the notification is closed by manual intervention from the user.

This event is not guaranteed to be emitted in all cases where the notification is closed.

On Windows, the close event can be emitted in one of three ways: programmatic dismissal with notification.close(), by the user closing the notification, or via system timeout. If a notification is in the Action Center after the initial close event is emitted, a call to notification.close() will remove the notification from the action center but the close event will not be emitted again.


fun on(event: NotificationEvent.FAILED, listener: (event: Event<*>, error: String) -> Unit)(source)

Emitted when an error is encountered while creating and showing the native notification.


fun on(event: NotificationEvent.REPLY, listener: (event: Event<*>, reply: String) -> Unit)(source)

Emitted when the user clicks the "Reply" button on a notification with hasReply: true.


fun on(event: NotificationEvent.SHOW, listener: (event: Event<*>) -> Unit)(source)

Emitted when the notification is shown to the user. Note that this event can be fired multiple times as a notification can be shown multiple times through the show() method.