java.lang.Object
com.gluonhq.attach.localnotifications.impl.NotificationsManager

public class NotificationsManager extends Object
  • Constructor Details

    • NotificationsManager

      public NotificationsManager()
  • Method Details

    • processNotification

      public static void processNotification(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(String id)
      Unregister a Notification by its id
      Parameters:
      id - the id of the Notification
      Returns:
      the Notification being unregistered