Class WebNotification
java.lang.Object
org.vaadin.firitin.util.webnotification.WebNotification
A utility class for displaying web notifications (aka native OS displayed notifications)
in a Vaadin application. It provides methods to show notifications, check permission status, and request permissions.
Usage:
WebNotification notification = WebNotification.get();
notification.showNotification("Hello World!");
Compared to Vaadin's built-in notification system, this allows notifications to be displayed even when the browser window is not in focus, using the native OS notification system. Regular Vaadin notifications are more flexible for in-app notifications.
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic WebNotificationget()voidrequestPermission(Runnable onSuccess, Runnable onError) voidshowNotification(String msg) voidshowNotification(String msg, NotificationOptions options) voidvoidshowNotificationAsync(String msg, NotificationOptions options)  
- 
Constructor Details
- 
WebNotification
public WebNotification(com.vaadin.flow.component.UI ui)  
 - 
 - 
Method Details
- 
get
 - 
showNotification
 - 
showNotification
 - 
showNotificationAsync
 - 
showNotificationAsync
 - 
checkPermission
 - 
requestPermission
 
 -