setLocalCustomData

Introduction

Set the custom data for a given message on local.

The data created by this method will only stored in local, while not sent to other users, and will lost after re-installing.

Do not works on Web.

Parameter details

Parameter name Parameter type Required Platform Description
messageID String yes All The msgId of the message.
localCustomData String yes All The custom data for the 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 setLocalCustomDataRes = await TencentImSDKPlugin.v2TIMManager
        .getMessageManager()
        .setLocalCustomData(
            msgID: "msgID", 
            localCustomData: "localCustomData"); 
    if (setLocalCustomDataRes.code == 0) {
    }

results matching ""

    No results matching ""