enterRoom abstract method

Enter the room. If the room does not exist, it will be created automatically.

Supported version: 2.1.0. Detail description: After calling this API, If the room already exists, join the room directly; if the room does not exist, create a room and join. At the same time, if the room does not exist, after calling this interface, the room advanced properties set by the user will take effect. Business scenario: When you need to enter a multi-person chat scene with custom attributes, and you do not need to distinguish whether the room is created or added, you can enter a room through this interface. When to call: It can be called after logging in. Note: When everyone leaves the room, the room will be automatically destroyed, and a user can be in a maximum of 5 rooms at the same time. enterRoom is equivalent to createRoom and joinRoom, so you only need to choose one of the APIs. Related callbacks: The result of entering the room can be obtained through the onRoomEntered callback. Related APIs: You can enter the room through enterRoom, and leave the room through leaveRoom.

  • roomInfo Configuration information for the room that will be created. Only the first user who enters the room creates roomName and takes effect.
  • config Advanced properties of the room that will be created. Only the first user who enters the room is configured to take effect.

Implementation

Future<ZIMRoomEnteredResult> enterRoom(
    ZIMRoomInfo roomInfo, ZIMRoomAdvancedConfig config);