Class SightMessage

  • All Implemented Interfaces:

    
    public class SightMessage
    
                        

    Short Video Message Class

    The short video message class. This message will be 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 boolean isOriginal
      public final static Creator<SightMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean isOriginal()
      static SightMessage obtain(Uri localUri, int duration) Creates an instance of the SightMessage object.
      static SightMessage obtain(Uri thumbUri, Uri localUri, int duration)
      static SightMessage obtain(Context context, Uri localUri, int duration) Creates an instance of the SightMessage object.
      static SightMessage obtain(Context context, Uri thumbUri, Uri localUri, int duration) Creates an instance of the SightMessage object.
      Array<byte> encode()
      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 arrangement information of the Parcelable object.
      Uri getThumbUri() Retrieves the thumbnail Uri.
      void setThumbUri(Uri thumbUri) Sets the thumbnail URI.
      void setBase64(String base64) Sets the Base64 data to be passed
      String getBase64() Retrieves the Base64 data that needs to be passed.
      int getDuration() Retrieves the duration of the short video message in seconds.
      void setDuration(int duration) Sets the duration of the short video message in seconds.
      long getSize() Get the size of the short video file
      void setSize(long size) Sets the size of the short video file
      • Methods inherited from class java.lang.Object

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

      • SightMessage

        SightMessage()
      • SightMessage

        SightMessage(Array<byte> data)
      • SightMessage

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

      • isOriginal

         boolean isOriginal()
        Returns:

        Indicates whether to upload the original video. If true, the compression logic will be skipped.

      • obtain

         static SightMessage obtain(Uri localUri, int duration)

        Creates an instance of the SightMessage object. Only supports files starting with 'file'. To support 'content', use obtain.

        Parameters:
        localUri - The URI of the short video.
        duration - The duration of the video.
        Returns:

        An instance of the SightMessage object.

      • obtain

        @Deprecated() static SightMessage obtain(Uri thumbUri, Uri localUri, int duration)
        Parameters:
        thumbUri - The URI of the thumbnail.
        localUri - The URI of the short video.
        Returns:

        SightMessage object instance. @Deprecated Creates a SightMessage object instance. Only supports files starting with file. To support content, use obtain

      • obtain

         static SightMessage obtain(Context context, Uri localUri, int duration)

        Creates an instance of the SightMessage object.

        Parameters:
        context - The context.
        localUri - The URI of the short video.
        duration - The duration of the video.
        Returns:

        An instance of the SightMessage object.

      • obtain

         static SightMessage obtain(Context context, Uri thumbUri, Uri localUri, int duration)

        Creates an instance of the SightMessage object.

        Parameters:
        context - The context.
        thumbUri - The thumbnail URI.
        localUri - The local URI of the short video.
        duration - The duration of the video.
        Returns:

        An instance of the SightMessage object.

      • 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 arrangement information of the Parcelable object.

        Returns:

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

      • getThumbUri

         Uri getThumbUri()

        Retrieves the thumbnail Uri.

        Returns:

        The thumbnail Uri (in the case of receiving a message, this is an internal Uri. You need to use ResourceManager.getInstance().getFile(new Resource(Uri)) to obtain the actual address).

      • setThumbUri

         void setThumbUri(Uri thumbUri)

        Sets the thumbnail URI.

        Parameters:
        thumbUri - The URI of the thumbnail
      • setBase64

         void setBase64(String base64)

        Sets the Base64 data to be passed

        Parameters:
        base64 - The Base64 data.
      • getBase64

         String getBase64()

        Retrieves the Base64 data that needs to be passed.

        Returns:

        The Base64 data.

      • getDuration

         int getDuration()

        Retrieves the duration of the short video message in seconds.

      • setDuration

         void setDuration(int duration)

        Sets the duration of the short video message in seconds.

        Parameters:
        duration - The duration of the short video message
      • getSize

         long getSize()

        Get the size of the short video file

      • setSize

         void setSize(long size)

        Sets the size of the short video file