Class ImageMessage

  • All Implemented Interfaces:

    
    public class ImageMessage
    
                        

    Image Message Class

    The image message class. This message will be stored and counted as an unread message.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Creator<ImageMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static ImageMessage obtain() Creates an ImageMessage object.
      static ImageMessage obtain(Uri localUri) Generates an ImageMessage object.
      static ImageMessage obtain(Uri localUri, boolean isFull) Creates an ImageMessage object.
      static ImageMessage obtain(Uri thumUri, Uri localUri) Generates an ImageMessage object.
      static ImageMessage obtain(Uri thumUri, Uri localUri, boolean isFull) Generates an ImageMessage object.
      Array<byte> encode()
      void writeToParcel(Parcel dest, int flags) Writes the class's data into the provided Parcel.
      int describeContents() Describes the type of special objects included in the Parcelable object's arrangement information.
      void setIsFull(boolean isFull) Sets the flag for sending the original image.
      Uri getThumUri() Retrieves the thumbnail Uri.
      void setThumUri(Uri thumUri) Sets the thumbnail URI.
      boolean isFull() Indicates whether the image is the original.
      Uri getRemoteUri() Retrieves the URL of the network image (http://).
      void setRemoteUri(Uri remoteUri) Sets the network image URL (http://).
      String getBase64() Retrieves the Base64 data that needs to be passed.
      void setBase64(String base64) Set the Base64 data to be passed
      boolean isUpLoadExp() Indicates whether the upload failed.
      void setUpLoadExp(boolean upLoadExp) Sets whether the upload failed.
      Uri getLocalUri() Get the local image URL (file:///).
      void setLocalUri(Uri localUri) Sets the local image path (file:///).
      • Methods inherited from class java.lang.Object

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

      • ImageMessage

        ImageMessage()
        // Version 5.1.3 is deprecated.
      • ImageMessage

        ImageMessage(Array<byte> data)
      • ImageMessage

        ImageMessage(Parcel in)
        Constructor.
        Parameters:
        in - The Parcel object passed during initialization.
    • Method Detail

      • obtain

        @Deprecated() static ImageMessage obtain()

        Creates an ImageMessage object.

        Returns:

        An instance of the ImageMessage object. @Deprecated It is recommended to use obtain for handling image messages. If you need to set the thumbnail separately, call setThumUri.

      • obtain

         static ImageMessage obtain(Uri localUri)

        Generates an ImageMessage object.

        Parameters:
        localUri - The URI of the original image.
        Returns:

        An instance of the ImageMessage object.

      • obtain

         static ImageMessage obtain(Uri localUri, boolean isFull)

        Creates an ImageMessage object.

        Parameters:
        localUri - The URI of the large image.
        isFull - Indicates whether to send the original image.
        Returns:

        An instance of the ImageMessage object.

      • obtain

        @Deprecated() static ImageMessage obtain(Uri thumUri, Uri localUri)

        Generates an ImageMessage object.

        Parameters:
        thumUri - The URI of the thumbnail image.
        localUri - The URI of the full-size image.
        Returns:

        An instance of the ImageMessage object. @Deprecated It is recommended to use obtain for handling image messages. If you need to set the thumbnail separately, call setThumUri.

      • obtain

        @Deprecated() static ImageMessage obtain(Uri thumUri, Uri localUri, boolean isFull)

        Generates an ImageMessage object.

        Parameters:
        thumUri - The URI of the thumbnail image.
        localUri - The URI of the full-size image.
        isFull - Indicates whether to send the original image.
        Returns:

        An instance of the ImageMessage object. @Deprecated It is recommended to use obtain for handling image messages. If you need to set the thumbnail separately, call setThumUri.

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        Writes the class's data into the provided Parcel.

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

         int describeContents()

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

        Returns:

        A flag indicating the arrangement of special object types in the Parcelable object collection.

      • setIsFull

         void setIsFull(boolean isFull)

        Sets the flag for sending the original image.

        Parameters:
        isFull - Indicates whether to send the original image.
      • getThumUri

         Uri getThumUri()

        Retrieves the thumbnail Uri.

        Returns:

        The thumbnail Uri (in the case of received messages, this is an internal Uri. To obtain the actual address, use ResourceManager.getInstance().getFile(new Resource(Uri))).

      • setThumUri

         void setThumUri(Uri thumUri)

        Sets the thumbnail URI.

        Parameters:
        thumUri - The URI of the thumbnail
      • isFull

         boolean isFull()

        Indicates whether the image is the original.

        Returns:

        True if the image is original, false otherwise.

      • getRemoteUri

         Uri getRemoteUri()

        Retrieves the URL of the network image (http://).

        Returns:

        The URL of the network image (http://).

      • setRemoteUri

         void setRemoteUri(Uri remoteUri)

        Sets the network image URL (http://).

        Parameters:
        remoteUri - The network image URL (http://).
      • getBase64

         String getBase64()

        Retrieves the Base64 data that needs to be passed.

        Returns:

        The Base64 data.

      • setBase64

         void setBase64(String base64)

        Set the Base64 data to be passed

        Parameters:
        base64 - The Base64 data.
      • isUpLoadExp

         boolean isUpLoadExp()

        Indicates whether the upload failed.

        Returns:

        Indicates whether the upload failed.

      • setUpLoadExp

         void setUpLoadExp(boolean upLoadExp)

        Sets whether the upload failed.

        Parameters:
        upLoadExp - Indicates whether the upload failed.
      • getLocalUri

         Uri getLocalUri()

        Get the local image URL (file:///).

        Returns:

        The local image URL (file:///).

      • setLocalUri

         void setLocalUri(Uri localUri)

        Sets the local image path (file:///).

        Parameters:
        localUri - The local image path (file:///).