hyphenate_SDK4.0 5.0.0
hyphenate java IM SDK
 
Loading...
Searching...
No Matches
com.hyphenate.chat.EMFileMessageBody Class Referenceabstract
Inheritance diagram for com.hyphenate.chat.EMFileMessageBody:
com.hyphenate.chat.EMMessageBody com.hyphenate.chat.EMImageMessageBody com.hyphenate.chat.EMNormalFileMessageBody com.hyphenate.chat.EMVideoMessageBody com.hyphenate.chat.EMVoiceMessageBody

Classes

enum  EMDownloadStatus
 

Public Member Functions

 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 base class of file type message.

Constructor & Destructor Documentation

◆ EMFileMessageBody() [1/2]

com.hyphenate.chat.EMFileMessageBody.EMFileMessageBody ( String localPath)

The constructor method of the file message body.

Parameters
localPathThe absolute path to the attachment file or the path to the URI as a string.

◆ EMFileMessageBody() [2/2]

com.hyphenate.chat.EMFileMessageBody.EMFileMessageBody ( Uri localPath)

The constructor method of the file message body.

Parameters
localPathThe localPath URI of the attachment file.

Member Function Documentation

◆ displayName()

String com.hyphenate.chat.EMFileMessageBody.displayName ( )

Gets the filename.

Returns
The filename.

◆ downloadStatus()

EMDownloadStatus com.hyphenate.chat.EMFileMessageBody.downloadStatus ( )

Gets the download status of the attachment file.

Returns
The download status of the attachment file.

The SDK is downloading the file message.

The SDK successfully downloads the file message.

The SDK fails to download the file message.

File message download is pending.

◆ getFileName()

String com.hyphenate.chat.EMFileMessageBody.getFileName ( )

Gets the file name.

Returns
The file name.

Reimplemented in com.hyphenate.chat.EMImageMessageBody.

◆ getLocalUri()

Uri com.hyphenate.chat.EMFileMessageBody.getLocalUri ( )

The URI of the original local image, audio, and other file.

Returns
The URI of the original local image, audio, and other file.

◆ getLocalUrl()

String com.hyphenate.chat.EMFileMessageBody.getLocalUrl ( )

The absolute path or string representation of the resource identifier for the original local image, audio, and other file.

Returns
The absolute path or string representation of the resource identifier for the original local image, audio, and other file.

◆ getRemoteUrl()

String com.hyphenate.chat.EMFileMessageBody.getRemoteUrl ( )

Gets the server path for remote image originals, audio, and other file.

Returns
The server path for remote image originals, audio, and other file.

◆ getSecret()

String com.hyphenate.chat.EMFileMessageBody.getSecret ( )

Gets the token for downloading the message attachment. For image messages: the original, large, and thumbnail images share the same token. For video messages: the video file and thumbnail share the same token.

Returns
The file token generated by the server。

◆ setDownloadStatus()

void com.hyphenate.chat.EMFileMessageBody.setDownloadStatus ( EMDownloadStatus status)

Sets the download status of the attachment file.

Parameters
statusThe downloading status of the attachment file.

◆ setFileLength()

void com.hyphenate.chat.EMFileMessageBody.setFileLength ( long length)

Sets the data length (bytes) of the attachment file.

Parameters
lengthThe data length (bytes) of the attachment file.

◆ setFileName()

void com.hyphenate.chat.EMFileMessageBody.setFileName ( String fileName)

Sets the file name.

Parameters
fileNameThe file name.

◆ setLocalUrl() [1/2]

void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( String localUrl)

Sets the absolute path or string representation of the resource identifier for the original local image, audio, and other file.

Parameters
localUrlThe absolute path to the file or the string form of URI.

◆ setLocalUrl() [2/2]

void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( Uri localUrl)

Sets the URI of the original local image, audio, and other file.

Parameters
localUrlThe URI of the original local image, audio, and other file.

◆ setRemoteUrl()

void com.hyphenate.chat.EMFileMessageBody.setRemoteUrl ( String remoteUrl)

Sets the server path for remote image originals, audio, and other file.

Parameters
remoteUrlThe server path for remote image originals, audio, and other file.

◆ setSecret()

void com.hyphenate.chat.EMFileMessageBody.setSecret ( String secret)

Sets the file's token, this method is typically invoked by the SDK. For image messages: the original, large, and thumbnail images share the same token. For video messages: the video file and thumbnail share the same token.

Parameters
secretThe file's token.

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