Create Group
#
Create GroupTo create a group with image url to be uploaded as group profile image call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
GROUP_NAME | String | Name of the group(cannot be null or empty) |
MEMBERS_JID_LIST | List<String> | List of jids of the member (size cannot be less than 2 |
excluding group creator) | ||
GROUP_IMAGE_ID | String | url id of the uploaded image (can be empty) |
CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |
info
There is an overloading method available for createGroup which accepts image as a File
instead of url id.
To create a group with image file to be uploaded as group profile image call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
GROUP_NAME | String | Name of the group(cannot be null or empty) |
MEMBERS_JID_LIST | List<String> | List of jids of the member (size cannot be less than 2 |
excluding group creator) | ||
GROUP_IMAGE_FILE | File | image file to be uploaded as group profile image(can be empty) |
CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |
caution
If there is no internet or the connection between chat server and the app isn't made create group functionality will be executed and group will be created locally. Until the group is available in server messaging/profile update should be restricted in app side by checking the isGroupInOfflineMode
property
of RecentChat or ProfileDetails class else an exception will be thrown.
#
Get user list to add to a groupTo get the list of users who are eligible to add to a group while creating a group call the below method.
- Java
- Kotlin
warning
above method is available only if contact sync is enabled.
#
Move offline group to onlineTo move the group which is created locally to online(create in server) call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
GROUP_JID | String | Jid of the offline group |
CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |