createGroup

Introduction

Create a new group.

It is not allowed to create two groups with the same group ID for one specific sdkAPPID.

memberList can allocate memory he original group members, but not works for AVChatRoom, please provide null in this case.

The upper limit of the number of daily net increases of all group types is 10,000 for Pro Edition and Ultimate Edition, while the peak group count is 100,000 for them. There are additional fees for exceeding this limit, refers to here.

Community group only works with the SDK version of 4.0 and above, with Ultimate Edition, you can see the pricing plan here.

Community is a powerful tool for entertainment collaboration. It supports the community-group-topic hierarchy where messages are isolated and a high number of members share the same set of friend relationships. In addition, it allows you to group members and set group permissions for viewing, speaking, and managing things.

For details about the Community, see this documentation.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String no All The custom group ID.
groupType GroupType yes All The type of group.
groupName String yes All The name of the group.
notification String no All The original notification of the group.
introduction String no All The introduction of the group.
faceUrl String no All The URL of the avatar for the group.
bool String no All Is mute all the group member.
addOpt GroupAddOptTypeEnum no All The add group method and verification type.
memberList List< V2TimGroupMember > yes All The original group members list.
isSupportTopic bool no All isSupportTopic

Returned template

V2TimValueCallback<String>

{
    code : int
    desc : String
    data : String // The group ID
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.
data String The group ID.

Code example

    V2TimValueCallback<String> createGroupRes =
        await TencentImSDKPlugin.v2TIMManager.getGroupManager().createGroup(
      groupType: "Public",
      groupName: "groupName",
      notification: "",
      introduction: "",
      faceUrl: "",
      isAllMuted: false,
      isSupportTopic: false,
      addOpt: GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH,
      memberList: [],
    );
    if (createGroupRes.code == 0) {
      createGroupRes.data;
    }

results matching ""

    No results matching ""