Toast Notifications
Toast Notifications provide an effective way to notify users about events that occur in the application, even when the NodeActa Client is minimized or running in the background.
A Toast Notification appears as a pop-up above the system tray (near the clock) and remains visible for a short period of time. If the user does not interact with it, the notification is moved to the Windows Notification Center.
On Windows 11, clicking the clock on the taskbar opens the Calendar and Notification panel, where previously displayed notifications can be viewed.
To create a toast notification, you can use NodeActa ui.toastNotify() method. To respond to the toast notification click, you must implement onNotification() method in your app. Note that your app must be running in order to receive the notification. You can also use StartApp.onNotification() implementation, considering StartApp is always running.
export class MyToastApp extends App {
...
createNotification() {
ui.toastNotify( `O Captain! My Captain!`,
'This is my toast!',
`notificationid=<whatever>`,
Icons.people);
}
onNotification(launchArgs) {
// as a response on notification created above,
// launchArgs will contain 'notificationid=<whatever>'
}
}