Package io.rong.message
Class HQVoiceMessage
-
- All Implemented Interfaces:
public class HQVoiceMessageHigh-Definition Voice Message Class
This class represents a high-definition voice message. The message will be stored and counted as an unread message.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Creator<HQVoiceMessage>CREATOR
-
Constructor Summary
Constructors Constructor Description HQVoiceMessage(Array<byte> data)HQVoiceMessage(Parcel in)Constructor.
-
Method Summary
Modifier and Type Method Description static HQVoiceMessageobtain(Uri uri, int duration)Array<byte>encode()Serializes the local message object into message data. voidwriteToParcel(Parcel dest, int flags)Writes the class data into the provided Parcel. intdescribeContents()intgetDuration()Gets the duration of the voice message in seconds. voidsetDuration(int duration)Sets the duration of the voice message in seconds. UrigetFileUrl()Get the remote download URL for high-definition voice messages voidsetFileUrl(Uri uri)Sets the remote download URL for high-definition voice messages. -
-
Constructor Detail
-
HQVoiceMessage
HQVoiceMessage(Array<byte> data)
-
HQVoiceMessage
HQVoiceMessage(Parcel in)
Constructor.- Parameters:
in- The Parcel passed during initialization.
-
-
Method Detail
-
obtain
static HQVoiceMessage obtain(Uri uri, int duration)
-
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, may be 0 or PARCELABLE_WRITE_RETURN_VALUE.
-
describeContents
int describeContents()
-
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.
-
getFileUrl
Uri getFileUrl()
Get the remote download URL for high-definition voice messages
- Returns:
The remote download URL for high-definition voice messages
-
setFileUrl
void setFileUrl(Uri uri)
Sets the remote download URL for high-definition voice messages.
- Parameters:
uri- The remote download URL for high-definition voice messages.
-
-
-
-