Class RichContentMessage

  • All Implemented Interfaces:

    
    public class RichContentMessage
    
                        

    ImageTextMessage Class

    Represents an image-text message. This type of message is stored and counted in the unread message count.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public String title
      public String content
      public String imgUrl
      public String url
      public final static Creator<RichContentMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getTitle() Retrieves the message title.
      void setTitle(String title) Sets the message title.
      String getContent() Retrieves the message body.
      void setContent(String content) Sets the message body.
      String getImgUrl() Fetches the image URL of the message.
      void setImgUrl(String url) Set the image URL for the message.
      String getUrl() Retrieves the message URL.
      void setUrl(String url) Sets the message URL.
      static RichContentMessage obtain(String title, String content, String imageUrl) Generates a RichContentMessage object.
      static RichContentMessage obtain(String title, String content, String imageUrl, String url) Generates a RichContentMessage object.
      Array<byte> encode() Serializes the local message object into message data.
      void writeToParcel(Parcel dest, int flags) Writes the class data into the provided Parcel.
      int describeContents() Describes the type of special objects included in the Parcelable object arrangement information.
      List<String> getSearchableWord()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RichContentMessage

        RichContentMessage()
        Constructor.
      • RichContentMessage

        RichContentMessage(String title, String content, String imageUrl)
        Constructor.
        Parameters:
        title - Specifies the message title.
        content - Specifies the message content.
        imageUrl - Specifies the URL of the message image.
      • RichContentMessage

        RichContentMessage(String title, String content, String imageUrl, String url)
        Constructor.
        Parameters:
        title - The message title.
        content - The message content.
        imageUrl - The URL of the message image.
        url - The message URL.
      • RichContentMessage

        RichContentMessage(Array<byte> data)
        Constructor.
        Parameters:
        data - Byte array containing the JSON string.
    • Method Detail

      • getTitle

         String getTitle()

        Retrieves the message title.

        Returns:

        The message title

      • setTitle

         void setTitle(String title)

        Sets the message title.

        Parameters:
        title - The message title
      • getContent

         String getContent()

        Retrieves the message body.

        Returns:

        The message content

      • setContent

         void setContent(String content)

        Sets the message body.

        Parameters:
        content - The message content
      • getImgUrl

         String getImgUrl()

        Fetches the image URL of the message.

        Returns:

        The URL of the image

      • setImgUrl

         void setImgUrl(String url)

        Set the image URL for the message.

        Parameters:
        url - The URL of the image
      • getUrl

         String getUrl()

        Retrieves the message URL.

        Returns:

        The message URL

      • setUrl

         void setUrl(String url)

        Sets the message URL.

        Parameters:
        url - The message URL
      • obtain

         static RichContentMessage obtain(String title, String content, String imageUrl)

        Generates a RichContentMessage object.

        Parameters:
        title - The title of the message.
        content - The content of the message.
        imageUrl - The URL of the message image.
        Returns:

        Returns the generated RichContentMessage object.

      • obtain

         static RichContentMessage obtain(String title, String content, String imageUrl, String url)

        Generates a RichContentMessage object.

        Parameters:
        title - The title of the message.
        content - The content of the message.
        imageUrl - The URL of the message image.
        url - The URL of the message.
        Returns:

        Returns a RichContentMessage object.

      • encode

         Array<byte> encode()

        Serializes the local message object into message data.

        Returns:

        The message data.

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        Writes the class data into the provided Parcel.

        Parameters:
        dest - The Parcel into which the object is written.
        flags - Additional flags about how the object should be written, possibly 0 or PARCELABLE_WRITE_RETURN_VALUE.
      • describeContents

         int describeContents()

        Describes the type of special objects included in the Parcelable object arrangement information.

        Returns:

        A flag indicating the arrangement of the Parcelable object's special object type collection.