Class Message

  • All Implemented Interfaces:
    android.os.Parcelable , kotlin.Comparable

    
    public final class Message
     implements Comparable<Message>, Parcelable
                        

    Marigold Message representation

    • Constructor Detail

    • Method Detail

      • getTitle

         final String getTitle()

        The title of the Message

        Returns:

        String title

      • getMessageID

         final String getMessageID()

        The ID of the Message

        Returns:

        String message ID

      • getText

         final String getText()

        The body text of the Message.

        Returns:

        the body text

      • getType

         final String getType()

        The type of this message: Text, Image, Video, Link, or Fake Call.

        Returns:

        the type

      • getContentURL

         final String getContentURL()

        The content's URL if this is a TYPE_LINK Message.

        Returns:

        String contentURL

      • getMediaURL

         final String getMediaURL()

        If Message is of type TYPE_VIDEO, this links to the video content.

        Returns:

        the mediaURL

      • getImageURL

         final String getImageURL()

        URL of the Message's image.

        Returns:

        the image URL

      • getHtmlText

         final String getHtmlText()

        The formatted HTML text of the Message

        Returns:

        the formatted body text

      • isShareable

         final Boolean isShareable()

        Boolean stating if this Message has sharing enabled.

        Returns:

        true if this message able to be shared outside of the app. Otherwise false.

      • isRead

         final Boolean isRead()

        Internal method for setting read state via MessageStream setMessagesRead().

      • getCreatedAt

         final Date getCreatedAt()

        Created date of the Message.

        Returns:

        the createdAt

      • toJSON

         final JSONObject toJSON()

        Converts Message to JSON. Do not alter the signature of this method without updating the Cordova/Unity/etc wrappers. Wrappers use reflection to access this method.

        Returns:

        JSON representation of a Message

      • compareTo

         Integer compareTo(Message other)

        Compares this object to the specified object to determine their relative order by created date in descending order.

        Parameters:
        other - the object to compare to this instance.
        Returns:

        a negative integer if this instance is less than another; a positive integer if this instance is greater than another; 0 if this instance has the same order as another