Public Member Functions | |
String | getPath () |
String | getFileName () |
String | getUUID () |
int | getFileSize () |
void | downloadFile (final String path, final V2TIMDownloadCallback v2TIMDownloadCallback) |
void | getUrl (final V2TIMValueCallback< String > callback) |
String | toString () |
V2TIMElem | getNextElem () |
void | appendElem (V2TIMElem v2TIMElem) |
|
inline |
Get the file path (valid only for the message sender)
|
inline |
Get the file name
|
inline |
Get the file ID, which is an internal ID and can be used as an external cache key
|
inline |
Get the file size
|
inline |
Download a file The downloadFile API downloads files from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.
path | File save path, which must be specified externally |
v2TIMDownloadCallback | Callback |
|
inline |
Get the file download URL
|
inline |
|
inlineinherited |
|
inlineinherited |
Add the next element
To configure multiple elements, after creating a Message object, you can add the next element via the element object of Message.
The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem:
V2TIMMessage message = V2TIMManager.getMessageManager().createTextMessage("test");
V2TIMCustomElem customElem = new V2TIMCustomElem();
customElem.setData("Custom message".getBytes());
message.getTextElem().appendElem(customElem);