agora_chat_SDK  3.8.2
agorajavachatSDK
Public Member Functions | Static Public Attributes | List of all members
io.agora.chat.VoiceMessageBody Class Reference
Inheritance diagram for io.agora.chat.VoiceMessageBody:
io.agora.chat.FileMessageBody io.agora.chat.MessageBody

Public Member Functions

 VoiceMessageBody (File voiceFile, int duration)
 
 VoiceMessageBody (Uri voiceFile, int duration)
 
 VoiceMessageBody (EMAVoiceMessageBody body)
 
int getLength ()
 
long getFileSize ()
 
String toString ()
 
int describeContents ()
 
void writeToParcel (Parcel dest, int flags)
 
- Public Member Functions inherited from io.agora.chat.FileMessageBody
 FileMessageBody (String localPath)
 
 FileMessageBody (Uri localPath)
 
 FileMessageBody (EMAFileMessageBody body)
 
String getFileName ()
 
void setFileName (String fileName)
 
String getLocalUrl ()
 
void setLocalUrl (String localUrl)
 
Uri getLocalUri ()
 
void setLocalUrl (Uri localUrl)
 
String getRemoteUrl ()
 
void setRemoteUrl (String remoteUrl)
 
void setSecret (String secret)
 
String getSecret ()
 
String displayName ()
 
void setFileLength (long length)
 
EMDownloadStatus downloadStatus ()
 
void setDownloadStatus (EMDownloadStatus status)
 

Static Public Attributes

static final Parcelable.Creator< VoiceMessageBodyCREATOR
 

Detailed Description

Voice message body

    VoiceMessageBody body = new VoiceMessageBody(voiceFile, length);

Constructor & Destructor Documentation

io.agora.chat.VoiceMessageBody.VoiceMessageBody ( File  voiceFile,
int  duration 
)

Create a voice message body

Parameters
voiceFilevoice file
durationvoice clip length, in seconds
io.agora.chat.VoiceMessageBody.VoiceMessageBody ( Uri  voiceFile,
int  duration 
)

Create a voice message body

Parameters
voiceFileVoice uri
durationVoice clip length, in seconds

Member Function Documentation

long io.agora.chat.VoiceMessageBody.getFileSize ( )

get the video file size

Returns
Video file size
int io.agora.chat.VoiceMessageBody.getLength ( )

Get the length of the voice file, in seconds

Returns
Length of the voice file

Member Data Documentation

final Parcelable.Creator<VoiceMessageBody> io.agora.chat.VoiceMessageBody.CREATOR
static
Initial value:
= new Parcelable.Creator<VoiceMessageBody>() {
public VoiceMessageBody createFromParcel(Parcel in) {
return new VoiceMessageBody(in);
}
public VoiceMessageBody[] newArray(int size) {
return new VoiceMessageBody[size];
}
}

The documentation for this class was generated from the following file: