Skip to main content

Starting March 27, 2026, RC is rebranded as Nexconn. Existing RC SDK customers can continue using this documentation. New customers should refer to the Nexconn developer documentation.

Message Download

Description

  • The SDK provides functionalities for downloading, canceling, and pausing multimedia files.
  • For sending multimedia messages, refer to the "Sending Media Messages" section in Message Sending.

Download Multimedia Message

Download multimedia files.

Method


downloadMediaMessage(
message: RCIMIWMediaMessage,
listener: RCIMIWDownloadMediaMessageListener
): Promise<number>;

Parameter Description

ParameterTypeDescription
messageRCIMIWMediaMessageThe media message entity to be downloaded
listenerRCIMIWDownloadMediaMessageListenerEvent listener for downloading media messages

Return Value

Return ValueDescription
numberStatus code of the current operation. 0 indicates success, and the specific result needs to be implemented in the interface callback. Non-zero indicates failure, and the interface callback will not be triggered. Refer to the error code for detailed errors.

Code Example


const listener = {
onMediaMessageDownloading: (message: RCIMIWMediaMessage, progress: number) => {
//...
},
onDownloadingMediaMessageCanceled: (message: RCIMIWMediaMessage) => {
currentDownloadingMediaMessage = null;
//...
},
onMediaMessageDownloaded: (code: number, message: RCIMIWMediaMessage) => {
currentDownloadingMediaMessage = null;
//...
},
};
let code = await engine.downloadMediaMessage(message, listener);

Cancel Multimedia Message

Cancel the download of a multimedia message.

Method


cancelDownloadingMediaMessage(
message: RCIMIWMediaMessage,
callback: IRCIMIWCancelDownloadingMediaMessageCallback
): Promise<number>;

Parameter Description

ParameterTypeDescription
messageRCIMIWMediaMessageThe media message entity to cancel downloading
callbackIRCIMIWCancelDownloadingMediaMessageCallbackCallback for the interface call result.

Return Value

Return ValueDescription
numberStatus code of the current operation. 0 indicates success, and the specific result needs to be implemented in the interface callback. Non-zero indicates failure, and the interface callback will not be triggered. Refer to the error code for detailed errors.

Code Example

Return ValueDescription
numberStatus code of the current operation. 0 indicates success, and the specific result needs to be implemented in the interface callback. Non-zero indicates failure, and the interface callback will not be triggered. Refer to the error code for detailed errors.