Class VoiceMessage
-
- All Implemented Interfaces:
public class VoiceMessageVoice Message Class
The Voice Message class. This type of message will be stored and counted in the unread message count.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Creator<VoiceMessage>CREATOR
-
Constructor Summary
Constructors Constructor Description VoiceMessage(Array<byte> data)VoiceMessage(Parcel in)
-
Method Summary
Modifier and Type Method Description static VoiceMessageobtain(Uri uri, int duration)Array<byte>encode()voidwriteToParcel(Parcel dest, int flags)Writes the class data into the provided Parcel. intdescribeContents()Describes the type of special objects included in the arrangement information of the Parcelable object. UrigetUri()Retrieves the Uri of the audio file. voidsetUri(Uri uri)Sets the URI of the audio file. intgetDuration()Gets the duration of the voice message in seconds. voidsetDuration(int duration)Sets the duration of the voice message in seconds. StringgetBase64()voidsetBase64(String base64)-
-
Constructor Detail
-
VoiceMessage
VoiceMessage(Array<byte> data)
-
VoiceMessage
VoiceMessage(Parcel in)
-
-
Method Detail
-
obtain
static VoiceMessage obtain(Uri uri, int duration)
-
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.
-
getBase64
String getBase64()
-
setBase64
void setBase64(String base64)
-
-
-
-