Class Notification


  • public class Notification
    extends java.lang.Object
    Entity of GetSocial Push Notification.
    • Method Detail

      • getTitle

        public java.lang.String getTitle()
        Title of notification.
        Returns:
        title or empty string in case title is not present
      • getText

        public java.lang.String getText()
        Text of notification.
        Returns:
        full text of push notification.
      • getAction

        public Action getAction()
        Action to be done on notification click.
        Returns:
        one of ActionTypes.
      • getActionButtons

        public java.util.List<NotificationButton> getActionButtons()
        Return a list of buttons for this notification.
        Returns:
        list of buttons to show with notification.
      • getId

        public java.lang.String getId()
        Get the unique notification identifier.
        Returns:
        ID.
      • wasRead

        public boolean wasRead()
        Deprecated.
        Return was notification read by user or not.
        Returns:
        true, if notification was clicked by user or marked as read by developer.
      • getStatus

        public java.lang.String getStatus()
        Status of Notification. One of NotificationStatus.
        Returns:
        notification status.
      • getCreatedAt

        public long getCreatedAt()
        Date of notification creation.
        Returns:
        UNIX-timestamp of creation date in seconds.
      • getAttachment

        public MediaAttachment getAttachment()
        Returns:
        media attachment, or null if nothing was attached.
      • getSender

        public User getSender()
        Returns the sender of notification.
        Returns:
        sender or null.
      • getCustomization

        public NotificationCustomization getCustomization()
        Returns customization settings, like background image, title color, etc. Settings used only on Android.
        Returns:
        sender or null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object