agora_chat_SDK 1.0.6
agora java chat SDK
Public 成员函数 | 静态 Public 属性 | 所有成员列表
io.agora.chat.VoiceMessageBody类 参考
类 io.agora.chat.VoiceMessageBody 继承关系图:
io.agora.chat.FileMessageBody io.agora.chat.MessageBody

Public 成员函数

 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 成员函数 继承自 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)
 

静态 Public 属性

static final Parcelable.Creator< VoiceMessageBodyCREATOR
 

详细描述

语音消息体。

VoiceMessageBody body = new VoiceMessageBody(voiceFile, length);
VoiceMessageBody(File voiceFile, int duration)
Definition: VoiceMessageBody.java:55

构造及析构函数说明

◆ VoiceMessageBody() [1/2]

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

创建语音消息体。

参数
voiceFile语音文件路径。
duration语音时长,单位为秒。

◆ VoiceMessageBody() [2/2]

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

创建语音消息体。

参数
voiceFile语音文件的资源标识符。
duration语音时长,单位为秒。

成员函数说明

◆ getFileSize()

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

获取语音文件的大小。

返回
语音文件的大小,单位为字节。

◆ getLength()

int io.agora.chat.VoiceMessageBody.getLength ( )

获得语音时长。

返回
语音时长,单位为秒。

类成员变量说明

◆ CREATOR

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

该类的文档由以下文件生成: