getMessageManager

Introduction

Get the message manager, which is the main class for those message-related methods.

Get the message manager, which is the main class for those message-related methods.

Parameter details

This API has no parameters

Returned template

V2TIMMessageManager

Return value details

name type description
V2TIMMessageManager V2TIMMessageManager The message manager, which is the main class for those message-related methods.

Code example

    V2TimValueCallback<V2TimMsgCreateInfoResult> createTextMessageRes =
        await TencentImSDKPlugin.v2TIMManager
            .getMessageManager()
            .createTextMessage(
              text: "test", 
            );
    if (createTextMessageRes.code == 0) {
      String? id = createTextMessageRes.data?.id;
      V2TimValueCallback<V2TimMessage> sendMessageRes = await TencentImSDKPlugin
          .v2TIMManager
          .getMessageManager()
          .sendMessage(id: id!, receiver: "userID", groupID: "groupID");
      if (sendMessageRes.code == 0) {
      }
    }

results matching ""

    No results matching ""