Class NotificationsManager
- java.lang.Object
-
- com.gluonhq.attach.localnotifications.impl.NotificationsManager
-
public class NotificationsManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NotificationsManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
processNotification(java.lang.String id)
This method is called from the iOS/Android layer, in a different thread, so we need to call the runnable in the JavaFX Application Thread.static boolean
registerNotification(Notification n)
Register a Notification by its id, for later processingstatic Notification
unregisterNotification(java.lang.String id)
Unregister a Notification by its id
-
-
-
Method Detail
-
processNotification
public static void processNotification(java.lang.String id)
This method is called from the iOS/Android layer, in a different thread, so we need to call the runnable in the JavaFX Application Thread. If this method is called too early, and the map doesn't contain yet the notifications, it will be added to the unprocessed list, for later evaluation- Parameters:
id
- the id of the notification
-
registerNotification
public static boolean registerNotification(Notification n)
Register a Notification by its id, for later processing- Parameters:
n
- the Notification- Returns:
- Returns true if the notification was scheduled, or false if - the notification was already scheduled in the notifications manager. - the notification didn't have valid text or scheduled date.
-
unregisterNotification
public static Notification unregisterNotification(java.lang.String id)
Unregister a Notification by its id- Parameters:
id
- the id of the Notification- Returns:
- the Notification being unregistered
-
-