hyphenate_SDK3.0 4.0.0
hyphenate java IM SDK
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

The voice message body.

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

Constructor & Destructor Documentation

◆ EMVoiceMessageBody() [1/2]

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

Creates a voice message body.

Parameters
voiceFileThe path of the voice file.
durationThe voice duration in seconds.

◆ EMVoiceMessageBody() [2/2]

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

Creates a voice message body.

Parameters
voiceFileThe URI of the voice file.
durationThe voice duration in seconds.

Member Function Documentation

◆ getFileSize()

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

Gets the size of the voice file.

Returns
The size of the voice file in bytes.

◆ getLength()

int com.hyphenate.chat.EMVoiceMessageBody.getLength ( )

Gets the voice duration.

Returns
The voice duration in seconds.

Member Data Documentation

◆ CREATOR

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: