Public Member Functions | |
String | getPath () |
String | getUUID () |
int | getDataSize () |
int | getDuration () |
void | downloadSound (String path, final V2TIMDownloadCallback v2TIMDownloadCallback) |
void | getUrl (final V2TIMValueCallback< String > callback) |
void | convertVoiceToText (String language, final V2TIMValueCallback< String > callback) |
String | toString () |
V2TIMElem | getNextElem () |
void | appendElem (V2TIMElem v2TIMElem) |
|
inline |
Get the path of the audio file to be sent (can only be called by the message sender)
|
inline |
Get the internal ID of a voice message
|
inline |
Get the voice data size
|
inline |
Get the voice duration (seconds)
|
inline |
Download audio. This API downloads data from the server. To cache or store the data, you can use the UUID as the key. The Chat SDK does not store the files.
path | The path to which the audio file is saved. It must be specified externally. |
v2TIMDownloadCallback | Callback |
|
inline |
Get the voice download URL
|
inline |
Convert the voice to text (supported only in 7.4 and later versions).
language | The language of the voice recognized. |
|
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);