hyphenate_SDK4.0 5.0.0
hyphenate java IM SDK
 
Loading...
Searching...
No Matches
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)
 
int getLength ()
 
long getFileSize ()
 
String getText ()
 
- Public Member Functions inherited from com.hyphenate.chat.EMFileMessageBody
 EMFileMessageBody (String localPath)
 
 EMFileMessageBody (Uri localPath)
 
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 Member Functions inherited from com.hyphenate.chat.EMMessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

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.

◆ getText()

String com.hyphenate.chat.EMVoiceMessageBody.getText ( )

Gets the persisted transcribed text of the voice message.

Returns
The transcribed text. Returns an empty string if the message has not been transcribed or no result is available.

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