agora_chat_SDK  3.8.2
agorajavachatSDK
Classes | Public Member Functions | List of all members
io.agora.chat.GroupManager Class Reference

Classes

enum  GroupStyle
 

Public Member Functions

List< GroupgetAllGroups ()
 
Group getGroup (String groupId)
 
Group createGroup (String groupName, String desc, String[] allMembers, String reason, GroupOptions option) throws ChatException
 
void asyncCreateGroup (final String groupName, final String desc, final String[] allMembers, final String reason, final GroupOptions option, final ValueCallBack< Group > callback)
 
synchronized void loadAllGroups ()
 
void destroyGroup (final String groupId) throws ChatException
 
void asyncDestroyGroup (final String groupId, final CallBack callback)
 
void addUsersToGroup (String groupId, String[] newmembers) throws ChatException
 
void addUsersToGroup (String groupId, String[] newmembers, String welcomeMessage) throws ChatException
 
void asyncAddUsersToGroup (final String groupId, final String[] newmembers, final CallBack callback)
 
void removeUserFromGroup (final String groupId, final String username) throws ChatException
 
void asyncRemoveUserFromGroup (final String groupId, final String username, final CallBack callback)
 
void removeUsersFromGroup (final String groupId, final List< String > members) throws ChatException
 
void asyncRemoveUsersFromGroup (final String groupId, final List< String > members, final CallBack callback)
 
void leaveGroup (String groupId) throws ChatException
 
void asyncLeaveGroup (final String groupId, final CallBack callback)
 
Group getGroupFromServer (String groupId) throws ChatException
 
Group getGroupFromServer (String groupId, boolean fetchMembers) throws ChatException
 
void asyncGetGroupFromServer (final String groupId, final ValueCallBack< Group > callback)
 
synchronized List< GroupgetJoinedGroupsFromServer () throws ChatException
 
synchronized List< GroupgetJoinedGroupsFromServer (int pageIndex, int pageSize) throws ChatException
 
void asyncGetJoinedGroupsFromServer (final ValueCallBack< List< Group >> callback)
 
void asyncGetJoinedGroupsFromServer (final int pageIndex, final int pageSize, final ValueCallBack< List< Group >> callback)
 
CursorResult< GroupInfogetPublicGroupsFromServer (int pageSize, String cursor) throws ChatException
 
void asyncGetPublicGroupsFromServer (final int pageSize, final String cursor, final ValueCallBack< CursorResult< GroupInfo >> callback)
 
void joinGroup (String groupId) throws ChatException
 
void asyncJoinGroup (final String groupId, final CallBack callback)
 
void changeGroupName (String groupId, String changedGroupName) throws ChatException
 
void asyncChangeGroupName (final String groupId, final String changedGroupName, final CallBack callback)
 
void changeGroupDescription (String groupId, String changedDescription) throws ChatException
 
void asyncChangeGroupDescription (final String groupId, final String changedDescription, final CallBack callBack)
 
Group acceptInvitation (String groupId, String inviter) throws ChatException
 
void asyncAcceptInvitation (final String groupId, final String inviter, final ValueCallBack< Group > callback)
 
void declineInvitation (String groupId, String inviter, String reason) throws ChatException
 
void asyncDeclineInvitation (final String groupId, final String inviter, final String reason, final CallBack callback)
 
void acceptApplication (String username, String groupId) throws ChatException
 
void asyncAcceptApplication (final String username, final String groupId, final CallBack callback)
 
void declineApplication (String username, String groupId, String reason) throws ChatException
 
void asyncDeclineApplication (final String username, final String groupId, final String reason, final CallBack callback)
 
void inviteUser (String groupId, String[] beInvitedUsernames, String reason) throws ChatException
 
void asyncInviteUser (final String groupId, final String[] beInvitedUsernames, final String reason, final CallBack callback)
 
void applyJoinToGroup (String groupId, String reason) throws ChatException
 
void asyncApplyJoinToGroup (final String groupId, final String reason, final CallBack callback)
 
void blockGroupMessage (String groupId) throws ChatException
 
void asyncBlockGroupMessage (final String groupId, final CallBack callback)
 
void unblockGroupMessage (String groupId) throws ChatException
 
void asyncUnblockGroupMessage (final String groupId, final CallBack callback)
 
void blockUser (String groupId, String username) throws ChatException
 
void asyncBlockUser (final String groupId, final String username, final CallBack callback)
 
void blockUsers (String groupId, List< String > members) throws ChatException
 
void asyncBlockUsers (final String groupId, final List< String > members, final CallBack callback)
 
void unblockUser (String groupId, String username) throws ChatException
 
void asyncUnblockUser (final String groupId, final String username, final CallBack callback)
 
void unblockUsers (String groupId, List< String > members) throws ChatException
 
void asyncUnblockUsers (final String groupId, final List< String > members, final CallBack callback)
 
List< String > getBlockedUsers (String groupId) throws ChatException
 
List< String > getBlockedUsers (String groupId, int pageIndex, int pageSize) throws ChatException
 
void asyncGetBlockedUsers (final String groupId, final ValueCallBack< List< String >> callback)
 
void asyncGetBlockedUsers (final String groupId, final int pageIndex, final int pageSize, final ValueCallBack< List< String >> callback)
 
void addGroupChangeListener (GroupChangeListener listener)
 
void removeGroupChangeListener (GroupChangeListener listener)
 
CursorResult< String > fetchGroupMembers (String groupId, String cursor, int pageSize) throws ChatException
 
void asyncFetchGroupMembers (final String groupId, final String cursor, final int pageSize, final ValueCallBack< CursorResult< String >> callback)
 
Group changeOwner (String groupId, String newOwner) throws ChatException
 
void asyncChangeOwner (final String groupId, final String newOwner, final ValueCallBack< Group > callback)
 
Group addGroupAdmin (final String groupId, final String admin) throws ChatException
 
void asyncAddGroupAdmin (final String groupId, final String admin, final ValueCallBack< Group > callback)
 
Group removeGroupAdmin (String groupId, String admin) throws ChatException
 
void asyncRemoveGroupAdmin (final String groupId, final String admin, final ValueCallBack< Group > callback)
 
Group muteGroupMembers (String groupId, List< String > muteMembers, long duration) throws ChatException
 
void asyncMuteGroupMembers (final String groupId, final List< String > muteMembers, final long duration, final ValueCallBack< Group > callback)
 
Group unMuteGroupMembers (String groupId, List< String > members) throws ChatException
 
void asyncUnMuteGroupMembers (final String groupId, final List< String > members, final ValueCallBack< Group > callback)
 
Map< String, Long > fetchGroupMuteList (String groupId, int pageNum, int pageSize) throws ChatException
 
void asyncFetchGroupMuteList (final String groupId, final int pageNum, final int pageSize, final ValueCallBack< Map< String, Long >> callBack)
 
List< String > fetchGroupBlackList (String groupId, int pageNum, int pageSize) throws ChatException
 
void asyncFetchGroupBlackList (final String groupId, final int pageNum, final int pageSize, final ValueCallBack< List< String >> callBack)
 
void addToGroupWhiteList (final String groupId, final List< String > members, final CallBack callBack)
 
void removeFromGroupWhiteList (final String groupId, final List< String > members, final CallBack callBack)
 
void checkIfInGroupWhiteList (final String groupId, ValueCallBack< Boolean > callBack)
 
void fetchGroupWhiteList (final String groupId, final ValueCallBack< List< String >> callBack)
 
void muteAllMembers (final String groupId, final ValueCallBack< Group > callBack)
 
void unmuteAllMembers (final String groupId, final ValueCallBack< Group > callBack)
 
void updateGroupAnnouncement (String groupId, String announcement) throws ChatException
 
void asyncUpdateGroupAnnouncement (final String groupId, final String announcement, final CallBack callBack)
 
String fetchGroupAnnouncement (String groupId) throws ChatException
 
void asyncFetchGroupAnnouncement (final String groupId, final ValueCallBack< String > callBack)
 
MucSharedFile uploadGroupSharedFile (String groupId, String filePath, CallBack callBack) throws ChatException
 
void asyncUploadGroupSharedFile (final String groupId, final String filePath, final CallBack callBack)
 
List< MucSharedFilefetchGroupSharedFileList (String groupId, int pageNum, int pageSize) throws ChatException
 
void asyncFetchGroupSharedFileList (final String groupId, final int pageNum, final int pageSize, final ValueCallBack< List< MucSharedFile >> callBack)
 
void deleteGroupSharedFile (String groupId, String fileId) throws ChatException
 
void asyncDeleteGroupSharedFile (final String groupId, final String fileId, final CallBack callBack)
 
void downloadGroupSharedFile (String groupId, String fileId, String savePath, CallBack callBack) throws ChatException
 
void asyncDownloadGroupSharedFile (final String groupId, final String fileId, final String savePath, final CallBack callBack)
 
Group updateGroupExtension (String groupId, String extension) throws ChatException
 

Detailed Description

Group management is used to manage group creation, deletion, member management and other operations

Member Function Documentation

void io.agora.chat.GroupManager.acceptApplication ( String  username,
String  groupId 
) throws ChatException

Accept the application of the user to join this group Owner or administrator‘s authority is required Asynchronously method see asyncAcceptApplication(String, String, CallBack)

Synchronization method will block the current thread

Parameters
usernameApplication user
groupIdGroup id for application
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.acceptInvitation ( String  groupId,
String  inviter 
) throws ChatException

Accept group's invitation Asynchronously method see asyncAcceptInvitation(String, String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup ID
inviterInviter
Returns
The group user has accepted.
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.addGroupAdmin ( final String  groupId,
final String  admin 
) throws ChatException

Add group admin Owner‘s authority is required, admin has no authority Asynchronously method see asyncAddGroupAdmin(String, String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
adminThe admin id to add
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.addGroupChangeListener ( GroupChangeListener  listener)

Register the group change listener After registering, need use removeGroupChangeListener(GroupChangeListener) to unregister

Parameters
listenerListener of group event to register
void io.agora.chat.GroupManager.addToGroupWhiteList ( final String  groupId,
final List< String >  members,
final CallBack  callBack 
)

Add members to whitelist Owner or administrator‘s authority is required

Asynchronously method

Parameters
groupIdGroup id
membersMember list to add to whitelist
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.addUsersToGroup ( String  groupId,
String[]  newmembers 
) throws ChatException

Add users to the group Owner or administrator‘s authority is required Asynchronously method see asyncAddUsersToGroup(String, String[], CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
newmembersArray of new members to add
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.addUsersToGroup ( String  groupId,
String[]  newmembers,
String  welcomeMessage 
) throws ChatException

Add users to the group Owner or administrator‘s authority is required Asynchronously method see asyncAddUsersToGroup(String, String[], CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
newmembersArray of new members to add
welcomeMessagewelcome message
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.applyJoinToGroup ( String  groupId,
String  reason 
) throws ChatException

Apply to join the group Note: Group style is GroupStyle#GroupStylePublicJoinNeedApproval, which is the public group need to verify Asynchronously method see asyncApplyJoinToGroup(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
reasonMessage for join application
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.asyncAcceptApplication ( final String  username,
final String  groupId,
final CallBack  callback 
)

Accept the application of the user to join this group Owner or administrator‘s authority is required Synchronization method see acceptApplication(String, String)

Asynchronously method

Parameters
usernameApplication user
groupIdGroup id for application
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncAcceptInvitation ( final String  groupId,
final String  inviter,
final ValueCallBack< Group callback 
)

Accept group's invitation Synchronization method see acceptInvitation(String, String)

Asynchronously method

Parameters
groupIdGroup ID
inviterInviter
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncAddGroupAdmin ( final String  groupId,
final String  admin,
final ValueCallBack< Group callback 
)

Add group admin Owner‘s authority is required, admin has no authority Synchronization method see addGroupAdmin(String, String)

Asynchronously method

Parameters
groupIdGroup id
adminNew owner id
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncAddUsersToGroup ( final String  groupId,
final String[]  newmembers,
final CallBack  callback 
)

Add users to the group Owner or administrator‘s authority is required Synchronization method see addUsersToGroup(String, String[])

Asynchronously method

Parameters
groupIdGroup id
newmembersArray of new members to add
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncApplyJoinToGroup ( final String  groupId,
final String  reason,
final CallBack  callback 
)

Apply to join the group Note: Group style is GroupStyle#GroupStylePublicJoinNeedApproval, which is the public group need to verify Synchronization method see applyJoinToGroup(String, String)

Asynchronously method

Parameters
groupIdGroup id
reasonMessage for join application
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncBlockGroupMessage ( final String  groupId,
final CallBack  callback 
)

Set to disable receiving the group messages Current user is still group member, but no longer receives group message Synchronization method see blockGroupMessage(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncBlockUser ( final String  groupId,
final String  username,
final CallBack  callback 
)

Add user to group blacklist Set to block member who can not join group again and will be not allowed to receive any group messages Owner or administrator‘s authority is required Synchronization method see blockUser(String, String)

After v3.3.0: Member who be added to blacklist will be removed to group first, then add to blacklist; The previous version is not the action to remove from group

Asynchronously method

Parameters
groupIdGroup id
usernameUser to be blocked
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncBlockUsers ( final String  groupId,
final List< String >  members,
final CallBack  callback 
)

Add users to group blacklist Set to block members who can not join group again and will be not allowed to receive any group messages Owner or administrator‘s authority is required Synchronization method see blockUsers(String, List)

After v3.3.0: Members who be added to blacklist will be removed to group first, then add to blacklist; The previous version is not the action to remove from group

Asynchronously method

Parameters
groupIdGroup id
membersUsers to be blocked
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncChangeGroupDescription ( final String  groupId,
final String  changedDescription,
final CallBack  callBack 
)

Change group description. ONLY the group own can change group description Owner or administrator‘s authority is required Synchronization method see changeGroupDescription(String, String)

Asynchronously method

Parameters
groupIdGroup id
changedDescriptionChanged group description
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncChangeGroupName ( final String  groupId,
final String  changedGroupName,
final CallBack  callback 
)

Change group name Owner or administrator‘s authority is required Synchronization method see changeGroupName(String, String)

Asynchronously method

Parameters
groupIdGroup id to be change name
changedGroupNameNew group name
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncChangeOwner ( final String  groupId,
final String  newOwner,
final ValueCallBack< Group callback 
)

Transfer group ownership Owner‘s authority is required Synchronization method see changeOwner(String, String)

Asynchronously method

Parameters
groupIdGroup id
newOwnerNew Owner id
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncCreateGroup ( final String  groupName,
final String  desc,
final String[]  allMembers,
final String  reason,
final GroupOptions  option,
final ValueCallBack< Group callback 
)

Create a group After group is successful created, the data in memory and database will be updated; Multi-device will receive the notification event and then update the data in memory and database. You can set io.agora.MultiDeviceListener to monitor the event, the callback function is io.agora.MultiDeviceListener#onGroupEvent(int, String, List), the first parameter is the event which is io.agora.MultiDeviceListener#GROUP_CREATE

Asynchronously method

Parameters
groupNameGroup name, not necessary, pass null if not set
descGroup description, not necessary, pass null if not set
allMembersArray of members, no need include the owner of this group, not necessary, not null
reasonInvitation information when inviting members to join, not necessary, pass null if not set
optionOptions when creating a group, not necessary, not null. See GroupOptions Can set the following parameters: Maximum number of group members, default is 200; Group style, see GroupStyle, default is GroupStyle#GroupStylePrivateOnlyOwnerInvite; If it requires the content of invitee, default is false, invitee will auto join the group; Also can set group ext
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the Group instance created successful failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncDeclineApplication ( final String  username,
final String  groupId,
final String  reason,
final CallBack  callback 
)

Decline the application of the user to join this group Owner or administrator‘s authority is required Synchronization method see declineApplication(String, String, String)

Asynchronously method

Parameters
usernameApplication user
groupIdGroup id for application
reasonMessage for decline
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncDeclineInvitation ( final String  groupId,
final String  inviter,
final String  reason,
final CallBack  callback 
)

Decline group's invitation Synchronization method see declineInvitation(String, String, String)

Asynchronously method

Parameters
groupIdGroup ID
inviterInviter
reasonDeclining message
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncDeleteGroupSharedFile ( final String  groupId,
final String  fileId,
final CallBack  callBack 
)

Delete file from group Members can delete their own uploaded files, and the group owner or group administrator can delete all shared files Synchronization method see deleteGroupSharedFile(String, String)

Asynchronously method

Parameters
groupIdGroup id
fileIdFile id
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncDestroyGroup ( final String  groupId,
final CallBack  callback 
)

Destroy group Owner‘s authority is required Synchronization method see destroyGroup(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncDownloadGroupSharedFile ( final String  groupId,
final String  fileId,
final String  savePath,
final CallBack  callBack 
)

Download the file from group Synchronization method see downloadGroupSharedFile(String, String, String, CallBack)

Asynchronously method

Parameters
groupIdGroup id
fileIdFile id
savePathFile to saved path
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncFetchGroupAnnouncement ( final String  groupId,
final ValueCallBack< String >  callBack 
)

Get group announcement from server Group member‘s authority is required Synchronization method see fetchGroupAnnouncement(String)

Asynchronously method

Parameters
groupIdGroup id
callBackResult callback, success call ValueCallBack#onSuccess(Object), failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncFetchGroupBlackList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final ValueCallBack< List< String >>  callBack 
)

Fetch group blacklist from server by page Owner or administrator‘s authority is required Synchronization method see fetchGroupBlackList(String, int, int)

Asynchronously method

Parameters
groupIdGroup id
pageNumPage number, start from 1
pageSizeSize to be fetched per page
callBackResult callback, success call ValueCallBack#onSuccess(Object), return the group blacklist by page; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncFetchGroupMembers ( final String  groupId,
final String  cursor,
final int  pageSize,
final ValueCallBack< CursorResult< String >>  callback 
)

Get group's member list by page Synchronization method see fetchGroupMembers(String, String, int)

Asynchronously method

Parameters
groupIdGroup id
cursorThe count fetched a time
pageSizeThe cursor position to fetch data, use null if first call
callbackResult callback, success call ValueCallBack#onSuccess(Object), fetch result, see CursorResult, used to get next page and the group list, for the last page, CursorResult.getCursor() is an empty string. Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncFetchGroupMuteList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final ValueCallBack< Map< String, Long >>  callBack 
)

Fetch mute list Owner or administrator‘s authority is required Synchronization method see fetchGroupMuteList(String, int, int)

Asynchronously method

Parameters
groupIdGroup id
pageNumThe count fetched a time
pageSizeThe cursor position to fetch data
callBackResult callback, success call ValueCallBack#onSuccess(Object), return a map which contains the mute member id and mute duration, in which the key of each entry is the mute member id and the value is the expired time of banning post action, in milli-seconds; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncFetchGroupSharedFileList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final ValueCallBack< List< MucSharedFile >>  callBack 
)

Get the shared file list from server Synchronization method see fetchGroupSharedFileList(String, int, int)

Asynchronously method

Parameters
groupIdGroup id
pageNumPage number, start from 1
pageSizeSize to be fetched per page
callBackResult callback, success call ValueCallBack#onSuccess(Object), Return the shared files; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetBlockedUsers ( final String  groupId,
final ValueCallBack< List< String >>  callback 
)

Get blacklist from server, default maximum is 200 Owner or administrator‘s authority is required Synchronization method see getBlockedUsers(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the group's blacklist; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetBlockedUsers ( final String  groupId,
final int  pageIndex,
final int  pageSize,
final ValueCallBack< List< String >>  callback 
)

Get black list of group by page Owner or administrator‘s authority is required Synchronization method see getBlockedUsers(String, int, int)

Asynchronously method

Parameters
groupIdGroup id
pageIndexPage number, start from 1
pageSizeSize to be fetched per page
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the group's blacklist; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetGroupFromServer ( final String  groupId,
final ValueCallBack< Group callback 
)

Get information of group from server Synchronization method see getGroupFromServer(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetJoinedGroupsFromServer ( final ValueCallBack< List< Group >>  callback)

Fetch all joined groups from server Only return the group list, not include member list in group, use getGroupFromServer(String groupId) if you want it Synchronization method see getJoinedGroupsFromServer()

Asynchronously method

Parameters
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the group list has joined; failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetJoinedGroupsFromServer ( final int  pageIndex,
final int  pageSize,
final ValueCallBack< List< Group >>  callback 
)

Fetch joined groups from server by page Only return the group list, not include member list in group getGroupFromServer(String groupId) if you want it Synchronization method see getJoinedGroupsFromServer(int, int)

Asynchronously method

Parameters
pageIndexPage number, start from 1
pageSizeSize to be fetched per page
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the group list by page; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncGetPublicGroupsFromServer ( final int  pageSize,
final String  cursor,
final ValueCallBack< CursorResult< GroupInfo >>  callback 
)

Get public groups from server by page Synchronization method see getPublicGroupsFromServer(int, String)

Asynchronously method

Parameters
pageSizeThe count fetched a time
cursorThe cursor position to fetch data, use null if first call
callbackResult callback, success call ValueCallBack#onSuccess(Object), return result, see CursorResult, used to get next page and the group list, for the last page, CursorResult.getCursor() is an empty string; failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncInviteUser ( final String  groupId,
final String[]  beInvitedUsernames,
final String  reason,
final CallBack  callback 
)

Invite other users to join the group Note: The group style is GroupStyle#GroupStylePrivateMemberCanInvite, which allow group members to invite users Synchronization method see inviteUser(String, String[], String)

Asynchronously method

Parameters
groupIdGroup id
beInvitedUsernamesArray of users to be invited
reasonMessage for invitation
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncJoinGroup ( final String  groupId,
final CallBack  callback 
)

Join the group by the group id If group's style is GroupStyle#GroupStylePublicOpenJoin,join it not require owner agree; If is GroupStyle#GroupStylePublicJoinNeedApproval, need owner's agreement Synchronization method see joinGroup(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncLeaveGroup ( final String  groupId,
final CallBack  callback 
)

Current joined user exit group

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncMuteGroupMembers ( final String  groupId,
final List< String >  muteMembers,
final long  duration,
final ValueCallBack< Group callback 
)

Mute specified members from posting message for specified duration Owner or administrator‘s authority is required Synchronization method see muteGroupMembers(String, List, long)

Asynchronously method

Parameters
groupIdGroup id
muteMembersMute group members
durationMute duration, in milli-seconds
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncRemoveGroupAdmin ( final String  groupId,
final String  admin,
final ValueCallBack< Group callback 
)

Remove group administrator Owner‘s authority is required Synchronization method see removeGroupAdmin(String, String)

Asynchronously method

Parameters
groupIdGroup id
adminAdmin id to remove
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncRemoveUserFromGroup ( final String  groupId,
final String  username,
final CallBack  callback 
)

Remove member from group Owner or administrator‘s authority is required Synchronization method see removeUserFromGroup(String, String)

Asynchronously method

Parameters
groupIdGroup id
usernameUser id to be removed
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncRemoveUsersFromGroup ( final String  groupId,
final List< String >  members,
final CallBack  callback 
)

Remove members from group Owner or administrator‘s authority is required Synchronization method see '

Asynchronously method

Parameters
groupIdGroup id
membersUser ids to be removed
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUnblockGroupMessage ( final String  groupId,
final CallBack  callback 
)

Set to enable to receive the group message again Synchronization method see unblockGroupMessage(String)

Asynchronously method

Parameters
groupIdGroup id
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUnblockUser ( final String  groupId,
final String  username,
final CallBack  callback 
)

Remove the blocked user from the group blacklist Owner or administrator‘s authority is required Synchronization method see unblockUser(String, String)

Asynchronously method

Parameters
groupIdGroup id
usernameUsername to remove from blacklist
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUnblockUsers ( final String  groupId,
final List< String >  members,
final CallBack  callback 
)

Remove the blocked users from the group blacklist Owner or administrator‘s authority is required Synchronization method see unblockUsers(String, List)

Asynchronously method

Parameters
groupIdGroup id
membersThe users to remove from blacklist
callbackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUnMuteGroupMembers ( final String  groupId,
final List< String >  members,
final ValueCallBack< Group callback 
)

Unban the specified users Owner or administrator‘s authority is required Synchronization method see unMuteGroupMembers(String, List)

Asynchronously method

Parameters
groupIdGroup id
membersThe users to release mute
callbackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUpdateGroupAnnouncement ( final String  groupId,
final String  announcement,
final CallBack  callBack 
)

Update group announcement Owner or administrator‘s authority is required Synchronization method see updateGroupAnnouncement(String, String)

Asynchronously method

Parameters
groupIdGroup id
announcementGroup announcement
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.asyncUploadGroupSharedFile ( final String  groupId,
final String  filePath,
final CallBack  callBack 
)

Upload file to group Synchronization method see uploadGroupSharedFile(String, String, CallBack)

Asynchronously method

Parameters
groupIdGroup id
filePathFile local path
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
void io.agora.chat.GroupManager.blockGroupMessage ( String  groupId) throws ChatException

Set to disable receiving the group messages Current user is still group member, but no longer receives group message Asynchronously method see asyncBlockGroupMessage(String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.blockUser ( String  groupId,
String  username 
) throws ChatException

Add user to group blacklist Set to block member who can not join group again and will be not allowed to receive any group messages Owner or administrator‘s authority is required Asynchronously method see asyncBlockUser(String, String, CallBack)

After v3.3.0: Member who be added to blacklist will be removed to group first, then add to blacklist; The previous version is not the action to remove from group

Synchronization method will block the current thread

Parameters
groupIdGroup id
usernameUser to be blocked
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.blockUsers ( String  groupId,
List< String >  members 
) throws ChatException

Add users to group blacklist Set to block members who can not join group again and will be not allowed to receive any group messages Owner or administrator‘s authority is required Asynchronously method see asyncBlockUsers(String, List, CallBack)

After v3.3.0: Members who be added to blacklist will be removed to group first, then add to blacklist; The previous version is not the action to remove from group

Synchronization method will block the current thread

Parameters
groupIdGroup Id
membersUsers to be blocked
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.changeGroupDescription ( String  groupId,
String  changedDescription 
) throws ChatException

Change group description Owner or administrator‘s authority is required Asynchronously method see asyncChangeGroupDescription(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
changedDescriptionChanged group description
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.changeGroupName ( String  groupId,
String  changedGroupName 
) throws ChatException

Change group name Owner or administrator‘s authority is required Asynchronously method see asyncChangeGroupName(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id to be change name
changedGroupNameNew group name
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.changeOwner ( String  groupId,
String  newOwner 
) throws ChatException

Transfer group ownership Owner‘s authority is required Asynchronously method see asyncChangeOwner(String, String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
newOwnerNew owner id
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.checkIfInGroupWhiteList ( final String  groupId,
ValueCallBack< Boolean >  callBack 
)

Check if current user in group whitelist

Asynchronously method

Parameters
groupIdGroup id
callBackResult callback, success call ValueCallBack#onSuccess(Object), return the Boolean whether the current user is in group whitelist; Failure call ValueCallBack#onError(int, String)
Group io.agora.chat.GroupManager.createGroup ( String  groupName,
String  desc,
String[]  allMembers,
String  reason,
GroupOptions  option 
) throws ChatException

Create a group After group is successful created, the data in memory and database will be updated; Multi-device will receive the notification event and then update the data in memory and database. You can set io.agora.MultiDeviceListener to monitor the event, the callback function is io.agora.MultiDeviceListener#onGroupEvent(int, String, List), the first parameter is the event which is io.agora.MultiDeviceListener#GROUP_CREATE Asynchronously method see asyncCreateGroup(String, String, String[], String, GroupOptions, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupNameGroup name, not necessary, pass null if not set
descGroup description, not necessary, pass null if not set
allMembersArray of members, no need include the owner of this group, not necessary, not null
reasonInvitation information when inviting members to join, not necessary, pass null if not set
optionOptions when creating a group, not necessary, not null. See GroupOptions Can set the following parameters: Maximum number of group members, default is 200; Group style, see GroupStyle, default is GroupStyle#GroupStylePrivateOnlyOwnerInvite; If it requires the content of invitee, default is false, invitee will auto join the group; Also can set group ext
Returns
Return the Group instance created successful
Exceptions
ChatExceptionError info, see io.agora.Error
void io.agora.chat.GroupManager.declineApplication ( String  username,
String  groupId,
String  reason 
) throws ChatException

Decline the application of the user to join this group Owner or administrator‘s authority is required Asynchronously method see asyncDeclineApplication(String, String, String, CallBack)

Synchronization method will block the current thread

Parameters
usernameApplication user
groupIdGroup id for application
reasonMessage for decline
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.declineInvitation ( String  groupId,
String  inviter,
String  reason 
) throws ChatException

Decline group's invitation Synchronization method see asyncDeclineInvitation(String, String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup ID
inviterInviter
reasonDeclining message
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.deleteGroupSharedFile ( String  groupId,
String  fileId 
) throws ChatException

Delete file from group Members can delete their own uploaded files, and the group owner or group administrator can delete all shared files Asynchronously method see asyncDeleteGroupSharedFile(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
fileIdFile id
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.destroyGroup ( final String  groupId) throws ChatException

Destroy group Owner‘s authority is required Asynchronously method see asyncDestroyGroup(String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.downloadGroupSharedFile ( String  groupId,
String  fileId,
String  savePath,
CallBack  callBack 
) throws ChatException

Download the file from group Note the callback only callback progress Asynchronously method see asyncDownloadGroupSharedFile(String, String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
fileIdFile id
savePathFile to saved path
callBackProgress callback to download file
Exceptions
ChatExceptionError info, see Error
String io.agora.chat.GroupManager.fetchGroupAnnouncement ( String  groupId) throws ChatException

Get group announcement from server Group member‘s authority is required Asynchronously method see asyncFetchGroupAnnouncement(String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Returns
Group announcement
Exceptions
ChatExceptionError info, see Error
List<String> io.agora.chat.GroupManager.fetchGroupBlackList ( String  groupId,
int  pageNum,
int  pageSize 
) throws ChatException

Fetch group blacklist from server by page Owner or administrator‘s authority is required Asynchronously method see asyncFetchGroupBlackList(String, int, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
pageNumPage number, start from 1
pageSizeSize to be fetched per page
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
CursorResult<String> io.agora.chat.GroupManager.fetchGroupMembers ( String  groupId,
String  cursor,
int  pageSize 
) throws ChatException

Get group's member list by page When CursorResult.getCursor() is an empty string ("") in the result, there is no more data Asynchronously method see asyncFetchGroupMembers(String, String, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
cursorThe count fetched a time
pageSizeThe cursor position to fetch data, use null if first call
Returns
Fetch result, see CursorResult, used to get next page and the group list, for the last page, CursorResult.getCursor() is an empty string.
Exceptions
ChatExceptionError info, see Error
Map<String, Long> io.agora.chat.GroupManager.fetchGroupMuteList ( String  groupId,
int  pageNum,
int  pageSize 
) throws ChatException

Fetch mute list Owner or administrator‘s authority is required Asynchronously method see asyncFetchGroupMuteList(String, int, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
pageNumThe count fetched a time
pageSizeThe cursor position to fetch data
Returns
Return a map which contains the mute member id and mute duration, in which the key of each entry is the mute member id and the value is the expired time of banning post action, in milli-seconds
Exceptions
ChatExceptionError info, see Error
List<MucSharedFile> io.agora.chat.GroupManager.fetchGroupSharedFileList ( String  groupId,
int  pageNum,
int  pageSize 
) throws ChatException

Get the shared file list from server Asynchronously method see asyncFetchGroupSharedFileList(String, int, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
pageNumPage number, start from 1
pageSizeSize to be fetched per page
Returns
Return the shared files
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.fetchGroupWhiteList ( final String  groupId,
final ValueCallBack< List< String >>  callBack 
)

Fetch group whitelist from serer Owner or administrator‘s authority is required

Asynchronously method

Parameters
groupIdGroup id
callBackResult callback, success call ValueCallBack#onSuccess(Object), return the group whitelist; Failure call ValueCallBack#onError(int, String)
List<Group> io.agora.chat.GroupManager.getAllGroups ( )

Get all groups from cache Before call this method, we suggest that you can call loadAllGroups() at the appropriate time to load the group data from the DB into memory; If have not called loadAllGroups(), this method will load data from database first and then load from cache

Returns
Group List
List<String> io.agora.chat.GroupManager.getBlockedUsers ( String  groupId) throws ChatException

Fetch black list from server, default maximum is 200 Owner or administrator‘s authority is required Asynchronously method see asyncGetBlockedUsers(String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Returns
List List of users in group blacklist, default maximum is 200
Exceptions
ChatExceptionError info, see Error
List<String> io.agora.chat.GroupManager.getBlockedUsers ( String  groupId,
int  pageIndex,
int  pageSize 
) throws ChatException

Get blacklist of group from server by page Owner or administrator‘s authority is required Asynchronously method see asyncGetBlockedUsers(String, int, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
pageIndexPage number, start from 1
pageSizeSize to be fetched per page
Returns
List List of users in group blacklist by page
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.getGroup ( String  groupId)

Get local group from cache by group id

Parameters
groupIdGroup id to get
Returns
Return Group instance, return null if group is not exist
Group io.agora.chat.GroupManager.getGroupFromServer ( String  groupId) throws ChatException

Get information of group from server Do not get members, use fetchGroupMembers(String, String, int) if want ot get members Asynchronously method see asyncGetGroupFromServer(String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Returns
Group Return Group instance
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.getGroupFromServer ( String  groupId,
boolean  fetchMembers 
) throws ChatException

Get information of group from server When parameter of fetchMembers is true, fetch group members from server, maximum count is 200, if want to get more members, use fetchGroupMembers(String, String, int) Only members in group can get the member list of group

Synchronization method will block the current thread

Parameters
groupIdGroup id
fetchMembersWhether need fetch group members, if need fetch members, default action fetch 200 members
Returns
Group Return Group instance
Exceptions
ChatExceptionError info, see Error
synchronized List<Group> io.agora.chat.GroupManager.getJoinedGroupsFromServer ( ) throws ChatException

Fetch all joined groups from server Only return the group list, not include member list in group, use getGroupFromServer(String groupId) if you want it Asynchronously method see asyncGetJoinedGroupsFromServer(ValueCallBack)

Synchronization method will block the current thread

Returns
Group list of the current user has joined
Exceptions
ChatExceptionError info, see Error
synchronized List<Group> io.agora.chat.GroupManager.getJoinedGroupsFromServer ( int  pageIndex,
int  pageSize 
) throws ChatException

Fetch joined groups from server by page Only return the group list, not include member list in group getGroupFromServer(String groupId) if you want it Asynchronously method see asyncGetJoinedGroupsFromServer(int, int, ValueCallBack)

Synchronization method will block the current thread

Parameters
pageIndexPage number, start from 1
pageSizeSize to be fetched per page
Returns
Group list returned by page
Exceptions
ChatExceptionError info, see Error
CursorResult<GroupInfo> io.agora.chat.GroupManager.getPublicGroupsFromServer ( int  pageSize,
String  cursor 
) throws ChatException

Get public groups from server by page Asynchronously method see asyncGetPublicGroupsFromServer(int, String, ValueCallBack)

Synchronization method will block the current thread

Parameters
pageSizeThe count fetched a time
cursorThe cursor position to fetch data, use null if first call
Returns
Fetch result, see CursorResult, used to get next page and the group list, for the last page, CursorResult.getCursor() is an empty string.
Exceptions
ChatExceptionError code, see io.agora.Error
void io.agora.chat.GroupManager.inviteUser ( String  groupId,
String[]  beInvitedUsernames,
String  reason 
) throws ChatException

Invite other users to join the group Note: The group style is GroupStyle#GroupStylePrivateMemberCanInvite, which allow group members to invite users Asynchronously method see asyncInviteUser(String, String[], String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
beInvitedUsernamesArray of users to be invited
reasonMessage for invitation
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.joinGroup ( String  groupId) throws ChatException

Join the group by the group id If group's style is GroupStyle#GroupStylePublicOpenJoin,join it not require owner agree; If is GroupStyle#GroupStylePublicJoinNeedApproval, need owner's agreement Asynchronously method see asyncJoinGroup(String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.leaveGroup ( String  groupId) throws ChatException

Current joined user exit group

Synchronization method will block the current thread

Parameters
groupIdGroup id
Exceptions
ChatExceptionError info, see Error
synchronized void io.agora.chat.GroupManager.loadAllGroups ( )

load all local groups from database

void io.agora.chat.GroupManager.muteAllMembers ( final String  groupId,
final ValueCallBack< Group callBack 
)

Mute all members Owner or administrator‘s authority is required

Asynchronously method

Parameters
groupIdGroup id
callBackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
Group io.agora.chat.GroupManager.muteGroupMembers ( String  groupId,
List< String >  muteMembers,
long  duration 
) throws ChatException

Mute specified members from posting message for specified duration Owner or administrator‘s authority is required Asynchronously method see asyncMuteGroupMembers(String, List, long, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
muteMembersMute member list
durationMute duration, in milli-seconds
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.removeFromGroupWhiteList ( final String  groupId,
final List< String >  members,
final CallBack  callBack 
)

Remove members from whitelist Owner or administrator‘s authority is required

Asynchronously method

Parameters
groupIdGroup id
membersMember list to add to whitelist
callBackResult callback, success call CallBack#onSuccess(), failure call CallBack#onError(int, String)
Group io.agora.chat.GroupManager.removeGroupAdmin ( String  groupId,
String  admin 
) throws ChatException

Remove group administrator Owner‘s authority is required Asynchronously method see asyncRemoveGroupAdmin(String, String, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
adminAdmin id to remove
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.removeGroupChangeListener ( GroupChangeListener  listener)

Remove group change listener Use this method after registering addGroupChangeListener(GroupChangeListener)

Parameters
listenerListener of group event to unregister
void io.agora.chat.GroupManager.removeUserFromGroup ( final String  groupId,
final String  username 
) throws ChatException

Remove member from group Owner or administrator‘s authority is required Asynchronously method see asyncRemoveUserFromGroup(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
usernameUser id to be removed
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.removeUsersFromGroup ( final String  groupId,
final List< String >  members 
) throws ChatException

Remove members from group Owner or administrator‘s authority is required Asynchronously method see asyncRemoveUsersFromGroup(String, List, CallBack)}

Synchronization method will block the current thread

Parameters
groupIdGroup id
membersUser ids to be removed
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.unblockGroupMessage ( String  groupId) throws ChatException

Set to enable to receive the group message again Asynchronously method see asyncUnblockGroupMessage(String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.unblockUser ( String  groupId,
String  username 
) throws ChatException

Remove the blocked user from the group blacklist Owner or administrator‘s authority is required Asynchronously method see asyncUnblockUser(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
usernameUsername to remove from blacklist
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.unblockUsers ( String  groupId,
List< String >  members 
) throws ChatException

Remove the blocked users from the group blacklist Owner or administrator‘s authority is required Asynchronously method see asyncBlockUsers(String, List, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
membersThe users to remove from blacklist
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.unmuteAllMembers ( final String  groupId,
final ValueCallBack< Group callBack 
)

Release all members muted Owner or administrator‘s authority is required

Asynchronously method

Parameters
groupIdGroup id
callBackResult callback, success call ValueCallBack#onSuccess(Object), return the updated group instance; Failure call ValueCallBack#onError(int, String)
Group io.agora.chat.GroupManager.unMuteGroupMembers ( String  groupId,
List< String >  members 
) throws ChatException

Unban the specified users Owner or administrator‘s authority is required Asynchronously method see asyncUnMuteGroupMembers(String, List, ValueCallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
membersThe users to release mute
Returns
Return the updated group instance
Exceptions
ChatExceptionError info, see Error
void io.agora.chat.GroupManager.updateGroupAnnouncement ( String  groupId,
String  announcement 
) throws ChatException

Update group announcement Owner or administrator‘s authority is required Asynchronously method see asyncUpdateGroupAnnouncement(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdGroup id
announcementGroup announcement
Exceptions
ChatExceptionError info, see Error
Group io.agora.chat.GroupManager.updateGroupExtension ( String  groupId,
String  extension 
) throws ChatException

update group extension Owner or administrator‘s authority is required

Synchronization method will block the current thread

Parameters
groupIdGroup id
extensionExtension string
Exceptions
ChatExceptionError info, see Error
MucSharedFile io.agora.chat.GroupManager.uploadGroupSharedFile ( String  groupId,
String  filePath,
CallBack  callBack 
) throws ChatException

Upload file to group Note: The callback only callback the progress Asynchronously method see asyncUploadGroupSharedFile(String, String, CallBack)

Synchronization method will block the current thread

Parameters
groupIdgroup id
filePathFile local path
callBackProgress callback of uploading file
Returns
The shared file instance
Exceptions
ChatExceptionError info, see Error

The documentation for this class was generated from the following file: