Class VoiceMessage

  • All Implemented Interfaces:

    
    public class VoiceMessage
    
                        

    Voice Message Class

    The Voice Message class. This type of 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 final static Creator<VoiceMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static VoiceMessage obtain(Uri uri, int duration)
      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 getUri() Retrieves the Uri of the audio file.
      void setUri(Uri uri) Sets the URI of the audio file.
      int getDuration() Gets the duration of the voice message in seconds.
      void setDuration(int duration) Sets the duration of the voice message in seconds.
      String getBase64()
      void setBase64(String base64)
      • Methods inherited from class java.lang.Object

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

      • VoiceMessage

        VoiceMessage(Array<byte> data)
      • VoiceMessage

        VoiceMessage(Parcel in)
    • Method Detail

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        Writes the class data into the provided Parcel.

        Parameters:
        dest - The Parcel where the object is written.
        flags - Additional flags on how the object is 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.

      • getUri

         Uri getUri()

        Retrieves the Uri of the audio file.

        Returns:

        The Uri of the audio file (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).

      • setUri

         void setUri(Uri uri)

        Sets the URI of the audio file.

        Parameters:
        uri - The URI of the audio file.
      • getDuration

         int getDuration()

        Gets the duration of the voice message in seconds.

        Returns:

        The duration of the voice message in seconds.

      • setDuration

         void setDuration(int duration)

        Sets the duration of the voice message in seconds.

        Parameters:
        duration - The duration of the voice message in seconds.