Group Chat Overview

Groups is the simplest way to chat with multiple user at any given time.

Preparing group chat jid#

Almost of the sdk methods expect jid as a input parameter, so sdk provides below utility method to prepare the group jid from the group id. The method prepares the group chat jid from the given string by using chat config provided via [com.contusflysdk.api.ChatConnectionManager.initialize] method.

Note: The below characters is not allowed in groupId: U+0022 (") U+0026 (&) U+0027 (') U+002F (/) U+003A (:) U+003C (<) U+003E (>) U+0040 (@).

String groupJid = FlyUtils.getGroupJid(GROUP_ID)
ArgumentTypeDescription
GROUP_IDStringId of the group
caution

If group chat feature unavailable for your plan then below methods will throw 403 exception.

Group messaging#

Group messaging is very similiar to the single chat messaging. Instead of giving single chat jid , you need to provide group jid. if you don't have group jid, you can prepare that using the above method by giving group id.

Refer this doc for group messaging