downloadMessage

Introduction

Download media messages

Works since version 5.0.2.

In Flutter SDK 5.0.2 and above, all acquired multimedia messages (pictures, videos, voice, files) SDKs will not be actively downloaded, and users need to call this API to store the files in the black box directory.

Parameter details

Parameter name Parameter type Required Platform Description
msgID String yes All message id
messageType int yes All message type
imageType int yes All Picture type, only work on picture message
isSnapshot bool yes All Whether it is a snapshot, only work on video message

Returned template

V2TimCallback

{
    code : int
    desc : String
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the failure.

Code example



    V2TimCallback downloadMessageRes = await TencentImSDKPlugin.v2TIMManager
        .getMessageManager()
        .downloadMessage(
            msgID: '', 
            messageType: 3, 
            imageType: 0, 
            isSnapshot: false 
            );
    if (downloadMessageRes.code == 0) {

    }

results matching ""

    No results matching ""