hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
Public 成员函数 | 静态 Public 属性 | 所有成员列表
com.hyphenate.chat.EMVoiceMessageBody类 参考
类 com.hyphenate.chat.EMVoiceMessageBody 继承关系图:
com.hyphenate.chat.EMFileMessageBody com.hyphenate.chat.EMMessageBody

Public 成员函数

 EMVoiceMessageBody (File voiceFile, int duration)
 
 EMVoiceMessageBody (Uri voiceFile, int duration)
 
 EMVoiceMessageBody (EMAVoiceMessageBody body)
 
int getLength ()
 
long getFileSize ()
 
String toString ()
 
int describeContents ()
 
void writeToParcel (Parcel dest, int flags)
 
- Public 成员函数 继承自 com.hyphenate.chat.EMFileMessageBody
 EMFileMessageBody (String localPath)
 
 EMFileMessageBody (Uri localPath)
 
 EMFileMessageBody (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< EMVoiceMessageBodyCREATOR
 

详细描述

语音消息体

    EMVoiceMessageBody body = new EMVoiceMessageBody(voiceFile, length);

构造及析构函数说明

com.hyphenate.chat.EMVoiceMessageBody.EMVoiceMessageBody ( File  voiceFile,
int  duration 
)

创建一个语音消息体

参数
voiceFile语音文件路径
duration语音事件长度,单位为秒
com.hyphenate.chat.EMVoiceMessageBody.EMVoiceMessageBody ( Uri  voiceFile,
int  duration 
)

创建一个语音消息体

参数
voiceFile语音文件的资源标识符(路径)
duration语音事件长度,单位为秒

成员函数说明

long com.hyphenate.chat.EMVoiceMessageBody.getFileSize ( )

获取文件大小

返回
文件大小
int com.hyphenate.chat.EMVoiceMessageBody.getLength ( )

获得语音文件的长度

返回
语音文件的长度,单位是秒

类成员变量说明

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

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