hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
Public Member Functions | Static Public Attributes | List of all members
com.hyphenate.chat.EMVoiceMessageBody Class Reference
Inheritance diagram for com.hyphenate.chat.EMVoiceMessageBody:
com.hyphenate.chat.EMFileMessageBody com.hyphenate.chat.EMMessageBody

Public Member Functions

 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 Member Functions inherited from 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)
 

Static Public Attributes

static final Parcelable.Creator< EMVoiceMessageBodyCREATOR
 

Detailed Description

Voice message body

    EMVoiceMessageBody body = new EMVoiceMessageBody(voiceFile, length);

Constructor & Destructor Documentation

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

Create a voice message body

Parameters
voiceFilevoice file
durationvoice clip length, in seconds
com.hyphenate.chat.EMVoiceMessageBody.EMVoiceMessageBody ( Uri  voiceFile,
int  duration 
)

Create a voice message body

Parameters
voiceFileVoice uri
durationVoice clip length, in seconds

Member Function Documentation

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

get the video file size

Returns
Video file size
int com.hyphenate.chat.EMVoiceMessageBody.getLength ( )

Get the length of the voice file, in seconds

Returns
Length of the voice file

Member Data Documentation

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

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