agora_chat_SDK  3.8.2
agorajavachatSDK
Classes | Public Member Functions | List of all members
io.agora.chat.FileMessageBody Class Referenceabstract
Inheritance diagram for io.agora.chat.FileMessageBody:
io.agora.chat.MessageBody io.agora.chat.ImageMessageBody io.agora.chat.NormalFileMessageBody io.agora.chat.VideoMessageBody io.agora.chat.VoiceMessageBody

Classes

enum  EMDownloadStatus
 

Public Member Functions

 FileMessageBody (String localPath)
 
 FileMessageBody (Uri localPath)
 
 FileMessageBody (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)
 

Detailed Description

The base class of file type message

Constructor & Destructor Documentation

io.agora.chat.FileMessageBody.FileMessageBody ( String  localPath)

Constructor method of file message body

Parameters
localPathThe absolute path to the file or the path to the Uri as a string
io.agora.chat.FileMessageBody.FileMessageBody ( Uri  localPath)

Constructor method of file message body

Parameters
localPathUri of file

Member Function Documentation

String io.agora.chat.FileMessageBody.displayName ( )

Get the filename

Returns
The filename
EMDownloadStatus io.agora.chat.FileMessageBody.downloadStatus ( )

Get the file download status

Returns
File download status
String io.agora.chat.FileMessageBody.getFileName ( )

Get file name

Returns
File name
Uri io.agora.chat.FileMessageBody.getLocalUri ( )

Get the Uri of local image, voice and so on

String io.agora.chat.FileMessageBody.getLocalUrl ( )

Local file path or the string form of Uri

Returns
Local file path or the string form of Uri
String io.agora.chat.FileMessageBody.getRemoteUrl ( )

Get file's remote url

Returns
File's remote url
String io.agora.chat.FileMessageBody.getSecret ( )

获取服务器生成的文件的token

Returns
服务器生成的文件的token
void io.agora.chat.FileMessageBody.setDownloadStatus ( EMDownloadStatus  status)

Set the file download status

Parameters
statusFile download status
void io.agora.chat.FileMessageBody.setFileLength ( long  length)

Set file's length

Parameters
lengthFile length
void io.agora.chat.FileMessageBody.setFileName ( String  fileName)

Set file name

Parameters
fileNameFile name
void io.agora.chat.FileMessageBody.setLocalUrl ( String  localUrl)

Set local file path

Parameters
localUrlThe absolute path to the file or the string form of Uri
void io.agora.chat.FileMessageBody.setLocalUrl ( Uri  localUrl)

Set the Uri of local file

Parameters
localUrlThe Uri of file
void io.agora.chat.FileMessageBody.setRemoteUrl ( String  remoteUrl)

Set the remote url for file message body

Parameters
remoteUrlFile's remote url
void io.agora.chat.FileMessageBody.setSecret ( String  secret)

Set file's token, this method is typically invoked by SDK

Parameters
secretFile's token

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