hyphenate_SDK3.0  3.5.0
hyphenatejavaIMSDK
Classes | Public Member Functions | List of all members
com.hyphenate.chat.EMGroupManager Class Reference
Collaboration diagram for com.hyphenate.chat.EMGroupManager:
Collaboration graph
[legend]

Classes

enum  EMGroupStyle
 

Public Member Functions

List< EMGroupgetAllGroups ()
 
EMGroup getGroup (String groupId)
 
EMGroup createGroup (String groupName, String desc, String[] allMembers, String reason, EMGroupOptions option) throws HyphenateException
 
void asyncCreateGroup (final String groupName, final String desc, final String[] allMembers, final String reason, final EMGroupOptions option, final EMValueCallBack< EMGroup > callback)
 
synchronized void loadAllGroups ()
 
void destroyGroup (final String groupId) throws HyphenateException
 
void asyncDestroyGroup (final String groupId, final EMCallBack callback)
 
void addUsersToGroup (String groupId, String[] newmembers) throws HyphenateException
 
void asyncAddUsersToGroup (final String groupId, final String[] newmembers, final EMCallBack callback)
 
void removeUserFromGroup (final String groupId, final String username) throws HyphenateException
 
void asyncRemoveUserFromGroup (final String groupId, final String username, final EMCallBack callback)
 
void leaveGroup (String groupId) throws HyphenateException
 
void asyncLeaveGroup (final String groupId, final EMCallBack callback)
 
EMGroup getGroupFromServer (String groupId) throws HyphenateException
 
EMGroup getGroupFromServer (String groupId, boolean fetchMembers) throws HyphenateException
 
void asyncGetGroupFromServer (final String groupId, final EMValueCallBack< EMGroup > callback)
 
synchronized List< EMGroupgetJoinedGroupsFromServer () throws HyphenateException
 
synchronized List< EMGroupgetJoinedGroupsFromServer (int pageIndex, int pageSize) throws HyphenateException
 
void asyncGetJoinedGroupsFromServer (final EMValueCallBack< List< EMGroup >> callback)
 
void asyncGetJoinedGroupsFromServer (final int pageIndex, final int pageSize, final EMValueCallBack< List< EMGroup >> callback)
 
EMCursorResult< EMGroupInfogetPublicGroupsFromServer (int pageSize, String cursor) throws HyphenateException
 
void asyncGetPublicGroupsFromServer (final int pageSize, final String cursor, final EMValueCallBack< EMCursorResult< EMGroupInfo >> callback)
 
void joinGroup (String groupId) throws HyphenateException
 
void asyncJoinGroup (final String groupId, final EMCallBack callback)
 
void changeGroupName (String groupId, String changedGroupName) throws HyphenateException
 
void asyncChangeGroupName (final String groupId, final String changedGroupName, final EMCallBack callback)
 
void changeGroupDescription (String groupId, String changedDescription) throws HyphenateException
 
void asyncChangeGroupDescription (final String groupId, final String changedDescription, final EMCallBack callBack)
 
EMGroup acceptInvitation (String groupId, String inviter) throws HyphenateException
 
void asyncAcceptInvitation (final String groupId, final String inviter, final EMValueCallBack< EMGroup > callback)
 
void declineInvitation (String groupId, String inviter, String reason) throws HyphenateException
 
void asyncDeclineInvitation (final String groupId, final String inviter, final String reason, final EMCallBack callback)
 
void acceptApplication (String username, String groupId) throws HyphenateException
 
void asyncAcceptApplication (final String username, final String groupId, final EMCallBack callback)
 
void declineApplication (String username, String groupId, String reason) throws HyphenateException
 
void asyncDeclineApplication (final String username, final String groupId, final String reason, final EMCallBack callback)
 
void inviteUser (String groupId, String[] beInvitedUsernames, String reason) throws HyphenateException
 
void asyncInviteUser (final String groupId, final String[] beInvitedUsernames, final String reason, final EMCallBack callback)
 
void applyJoinToGroup (String groupId, String reason) throws HyphenateException
 
void asyncApplyJoinToGroup (final String groupId, final String reason, final EMCallBack callback)
 
void blockGroupMessage (String groupId) throws HyphenateException
 
void asyncBlockGroupMessage (final String groupId, final EMCallBack callback)
 
void unblockGroupMessage (String groupId) throws HyphenateException
 
void asyncUnblockGroupMessage (final String groupId, final EMCallBack callback)
 
void blockUser (String groupId, String username) throws HyphenateException
 
void asyncBlockUser (final String groupId, final String username, final EMCallBack callback)
 
void unblockUser (String groupId, String username) throws HyphenateException
 
void asyncUnblockUser (final String groupId, final String username, final EMCallBack callback)
 
List< String > getBlockedUsers (String groupId) throws HyphenateException
 
List< String > getBlockedUsers (String groupId, int pageIndex, int pageSize) throws HyphenateException
 
void asyncGetBlockedUsers (final String groupId, final EMValueCallBack< List< String >> callback)
 
void asyncGetBlockedUsers (final String groupId, final int pageIndex, final int pageSize, final EMValueCallBack< List< String >> callback)
 
void addGroupChangeListener (EMGroupChangeListener listener)
 
void removeGroupChangeListener (EMGroupChangeListener listener)
 
EMCursorResult< String > fetchGroupMembers (String groupId, String cursor, int pageSize) throws HyphenateException
 
void asyncFetchGroupMembers (final String groupId, final String cursor, final int pageSize, final EMValueCallBack< EMCursorResult< String >> callback)
 
EMGroup changeOwner (String groupId, String newOwner) throws HyphenateException
 
void asyncChangeOwner (final String groupId, final String newOwner, final EMValueCallBack< EMGroup > callback)
 
EMGroup addGroupAdmin (final String groupId, final String admin) throws HyphenateException
 
void asyncAddGroupAdmin (final String groupId, final String admin, final EMValueCallBack< EMGroup > callback)
 
EMGroup removeGroupAdmin (String groupId, String admin) throws HyphenateException
 
void asyncRemoveGroupAdmin (final String groupId, final String admin, final EMValueCallBack< EMGroup > callback)
 
EMGroup muteGroupMembers (String groupId, List< String > muteMembers, long duration) throws HyphenateException
 
void aysncMuteGroupMembers (final String groupId, final List< String > muteMembers, final long duration, final EMValueCallBack< EMGroup > callback)
 
EMGroup unMuteGroupMembers (String groupId, List< String > members) throws HyphenateException
 
void asyncUnMuteGroupMembers (final String groupId, final List< String > members, final EMValueCallBack< EMGroup > callback)
 
Map< String, Long > fetchGroupMuteList (String groupId, int pageNum, int pageSize) throws HyphenateException
 
void asyncFetchGroupMuteList (final String groupId, final int pageNum, final int pageSize, final EMValueCallBack< Map< String, Long >> callBack)
 
List< String > fetchGroupBlackList (String groupId, int pageNum, int pageSize) throws HyphenateException
 
void asyncFetchGroupBlackList (final String groupId, final int pageNum, final int pageSize, final EMValueCallBack< List< String >> callBack)
 
void updateGroupAnnouncement (String groupId, String announcement) throws HyphenateException
 
void asyncUpdateGroupAnnouncement (final String groupId, final String announcement, final EMCallBack callBack)
 
String fetchGroupAnnouncement (String groupId) throws HyphenateException
 
void asyncFetchGroupAnnouncement (final String groupId, final EMValueCallBack< String > callBack)
 
EMMucSharedFile uploadGroupSharedFile (String groupId, String filePath, EMCallBack callBack) throws HyphenateException
 
void asyncUploadGroupSharedFile (final String groupId, final String filePath, final EMCallBack callBack)
 
List< EMMucSharedFilefetchGroupSharedFileList (String groupId, int pageNum, int pageSize) throws HyphenateException
 
void asyncFetchGroupSharedFileList (final String groupId, final int pageNum, final int pageSize, final EMValueCallBack< List< EMMucSharedFile >> callBack)
 
void deleteGroupSharedFile (String groupId, String fileId) throws HyphenateException
 
void asyncDeleteGroupSharedFile (final String groupId, final String fileId, final EMCallBack callBack)
 
void downloadGroupSharedFile (String groupId, String fileId, String savePath, EMCallBack callBack) throws HyphenateException
 
void asyncDownloadGroupSharedFile (final String groupId, final String fileId, final String savePath, final EMCallBack callBack)
 
EMGroup updateGroupExtension (String groupId, String extension) throws HyphenateException
 

Detailed Description

group manager is used to manage all the groups related operations, create, delete, group and invite members, block memebers, etc..

Member Function Documentation

void com.hyphenate.chat.EMGroupManager.acceptApplication ( String  username,
String  groupId 
) throws HyphenateException

accept the application of the user to join this group

Parameters
usernameapplication user
groupIdgroup id for application
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.acceptInvitation ( String  groupId,
String  inviter 
) throws HyphenateException

accept group's invitation.

Parameters
groupIdGroup ID
inviterInviter
Returns
The group user has accepted.
EMGroup com.hyphenate.chat.EMGroupManager.addGroupAdmin ( final String  groupId,
final String  admin 
) throws HyphenateException

add group admin. ONLY group owner can perform this action. Admin has no authority.

Synchronization method will block the current thread

Parameters
groupId
admin
Returns
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.addGroupChangeListener ( EMGroupChangeListener  listener)

register the group change listener

Parameters
listener
See also
EMGroupChangeListener
void com.hyphenate.chat.EMGroupManager.addUsersToGroup ( String  groupId,
String[]  newmembers 
) throws HyphenateException

add users to the group and only the group owner can do it.

Parameters
groupId
newmembersuser id to be added
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.applyJoinToGroup ( String  groupId,
String  reason 
) throws HyphenateException

apply to join the group

Parameters
groupId
reasonmessage for join application
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.asyncAcceptApplication ( final String  username,
final String  groupId,
final EMCallBack  callback 
)

accept the application of the user to join this group

Parameters
usernameapplication user
groupIdgroup id for application
callback
void com.hyphenate.chat.EMGroupManager.asyncAcceptInvitation ( final String  groupId,
final String  inviter,
final EMValueCallBack< EMGroup callback 
)

accept group's invitation

Parameters
groupIdGroup ID
inviterInviter
callback
void com.hyphenate.chat.EMGroupManager.asyncAddGroupAdmin ( final String  groupId,
final String  admin,
final EMValueCallBack< EMGroup callback 
)

add group admin. ONLY group owner can perform this action

Parameters
groupId
admin
callback
void com.hyphenate.chat.EMGroupManager.asyncAddUsersToGroup ( final String  groupId,
final String[]  newmembers,
final EMCallBack  callback 
)

add users to the group and only the group owner can do it.

Parameters
groupId
newmembersuser id to be added
callback
void com.hyphenate.chat.EMGroupManager.asyncApplyJoinToGroup ( final String  groupId,
final String  reason,
final EMCallBack  callback 
)

apply to join the group

Parameters
groupId
reasonmessage for join application
callback
void com.hyphenate.chat.EMGroupManager.asyncBlockGroupMessage ( final String  groupId,
final EMCallBack  callback 
)

set to disable receiving the group messages

Parameters
groupId
callback
void com.hyphenate.chat.EMGroupManager.asyncBlockUser ( final String  groupId,
final String  username,
final EMCallBack  callback 
)

set to block member who will be not allowed to receive any group messages and only the group owner can do it.

Parameters
groupId
usernameuser to be blocked
callback
void com.hyphenate.chat.EMGroupManager.asyncChangeGroupDescription ( final String  groupId,
final String  changedDescription,
final EMCallBack  callBack 
)

Change group description. ONLY the group own can change group description

Parameters
groupIdgroup id
changedDescriptionchanged group description
callBack
void com.hyphenate.chat.EMGroupManager.asyncChangeGroupName ( final String  groupId,
final String  changedGroupName,
final EMCallBack  callback 
)

Change group name. ONLY the group own can change group name

Parameters
groupIdgroup id to be change name
changedGroupNamenew name
callback
void com.hyphenate.chat.EMGroupManager.asyncChangeOwner ( final String  groupId,
final String  newOwner,
final EMValueCallBack< EMGroup callback 
)

Transfer group ownership. ONLY group owner can perform this action

Parameters
groupId
newOwner
callback
void com.hyphenate.chat.EMGroupManager.asyncCreateGroup ( final String  groupName,
final String  desc,
final String[]  allMembers,
final String  reason,
final EMGroupOptions  option,
final EMValueCallBack< EMGroup callback 
)

create a group on IM server

Parameters
groupNamegroup name
descGroup description
allMembersarray of all members, no need include the owner of this group
reasonmessage used to invite the group members
optionoptions for this group
callback
void com.hyphenate.chat.EMGroupManager.asyncDeclineApplication ( final String  username,
final String  groupId,
final String  reason,
final EMCallBack  callback 
)

accept the application of the user to join this group

Parameters
usernameapplication user
groupIdgroup id for application
reasonmessage for decline
callback
void com.hyphenate.chat.EMGroupManager.asyncDeclineInvitation ( final String  groupId,
final String  inviter,
final String  reason,
final EMCallBack  callback 
)

decline group's invitation

Parameters
groupIdGroup ID
inviterInviter
reasondeclining message
callback
void com.hyphenate.chat.EMGroupManager.asyncDeleteGroupSharedFile ( final String  groupId,
final String  fileId,
final EMCallBack  callBack 
)

async delete file from group

Parameters
groupIdgroup id
fileIdfile id
callBackcallback
void com.hyphenate.chat.EMGroupManager.asyncDestroyGroup ( final String  groupId,
final EMCallBack  callback 
)

dismiss the group and only the group owner can do it.

Parameters
groupId
callback
void com.hyphenate.chat.EMGroupManager.asyncDownloadGroupSharedFile ( final String  groupId,
final String  fileId,
final String  savePath,
final EMCallBack  callBack 
)

download the file from group

Parameters
groupIdgroup id
fileIdfile id
savePathfile to saved path
callBackcallback
void com.hyphenate.chat.EMGroupManager.asyncFetchGroupAnnouncement ( final String  groupId,
final EMValueCallBack< String >  callBack 
)

async get group announcement from server

Parameters
groupId
callBack
void com.hyphenate.chat.EMGroupManager.asyncFetchGroupBlackList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final EMValueCallBack< List< String >>  callBack 
)

fetch black list from server, need owner or administrator's authority to access

Parameters
groupIdgroup id
pageNumpage number
pageSizepage size
callBackasynchronous callback method
void com.hyphenate.chat.EMGroupManager.asyncFetchGroupMembers ( final String  groupId,
final String  cursor,
final int  pageSize,
final EMValueCallBack< EMCursorResult< String >>  callback 
)

Get group's member list

EMCursorResult result = fetchGroupMembers(groupId, cursor, pageSize); // search 1 result = fetchGroupMembers(groupId, result.getCursor(), pageSize); // search 2

Parameters
groupId
cursorcursor is the location indicator from previous search, pass the value of the cursor for following search
pageSize
callback
void com.hyphenate.chat.EMGroupManager.asyncFetchGroupMuteList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final EMValueCallBack< Map< String, Long >>  callBack 
)

fetch mute list, which contains mute members and mute time, need owner or administrator's authority to access

Parameters
groupId
pageNum
pageSize
callBackcallback function that receive the executed result, Map.entry.key is username of mute action, Map.entry.value is expired time of banning post action, in milli-seconds
void com.hyphenate.chat.EMGroupManager.asyncFetchGroupSharedFileList ( final String  groupId,
final int  pageNum,
final int  pageSize,
final EMValueCallBack< List< EMMucSharedFile >>  callBack 
)

async get the shared file list from server

Parameters
groupIdgroup id
pageNumpage number
pageSizepage size
callBackcallback
void com.hyphenate.chat.EMGroupManager.asyncGetBlockedUsers ( final String  groupId,
final EMValueCallBack< List< String >>  callback 
)

Get blacklist from server. Require owner's authority. Max fetch object per request count is 200.

Parameters
callback
void com.hyphenate.chat.EMGroupManager.asyncGetBlockedUsers ( final String  groupId,
final int  pageIndex,
final int  pageSize,
final EMValueCallBack< List< String >>  callback 
)

Get black list of group, need owner's authority to access.

Parameters
callback
void com.hyphenate.chat.EMGroupManager.asyncGetGroupFromServer ( final String  groupId,
final EMValueCallBack< EMGroup callback 
)

get information of group from server.

Parameters
groupId
callback
void com.hyphenate.chat.EMGroupManager.asyncGetJoinedGroupsFromServer ( final EMValueCallBack< List< EMGroup >>  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

Parameters
callbackcontains group list
void com.hyphenate.chat.EMGroupManager.asyncGetJoinedGroupsFromServer ( final int  pageIndex,
final int  pageSize,
final EMValueCallBack< List< EMGroup >>  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

Parameters
pageIndex
pageSize
callbackcontains group list
void com.hyphenate.chat.EMGroupManager.asyncGetPublicGroupsFromServer ( final int  pageSize,
final String  cursor,
final EMValueCallBack< EMCursorResult< EMGroupInfo >>  callback 
)

get all public groups from server

Parameters
pageSizethe number of groups
cursorused to get group page by page, use null if first call
callbackresult contains cursor and group list
void com.hyphenate.chat.EMGroupManager.asyncInviteUser ( final String  groupId,
final String[]  beInvitedUsernames,
final String  reason,
final EMCallBack  callback 
)

invite other users to join the group if the group has been set to allow member to invite

Parameters
groupId
beInvitedUsernamesarray of users to be invited
reasonmessage for invitation
callback
void com.hyphenate.chat.EMGroupManager.asyncJoinGroup ( final String  groupId,
final EMCallBack  callback 
)

join the group by the group id

Parameters
groupId
void com.hyphenate.chat.EMGroupManager.asyncLeaveGroup ( final String  groupId,
final EMCallBack  callback 
)

the member exit the group

Parameters
groupId
callback
void com.hyphenate.chat.EMGroupManager.asyncRemoveGroupAdmin ( final String  groupId,
final String  admin,
final EMValueCallBack< EMGroup callback 
)

remove group administrator, need owner's authority to access

Parameters
groupId
admin
callback
void com.hyphenate.chat.EMGroupManager.asyncRemoveUserFromGroup ( final String  groupId,
final String  username,
final EMCallBack  callback 
)

remove the member from the group and only the group owner can do it.

Parameters
groupId
usernameuser id to be removed
callback
void com.hyphenate.chat.EMGroupManager.asyncUnblockGroupMessage ( final String  groupId,
final EMCallBack  callback 
)

set to enable to receive the group message again

Parameters
groupId
callback
void com.hyphenate.chat.EMGroupManager.asyncUnblockUser ( final String  groupId,
final String  username,
final EMCallBack  callback 
)

remove the blocked user from the group balcklist

Parameters
groupId
username
callback
void com.hyphenate.chat.EMGroupManager.asyncUnMuteGroupMembers ( final String  groupId,
final List< String >  members,
final EMValueCallBack< EMGroup callback 
)

Unmute group members, need owner or administrator's authority to access

Parameters
groupId
members
callback
callback
void com.hyphenate.chat.EMGroupManager.asyncUpdateGroupAnnouncement ( final String  groupId,
final String  announcement,
final EMCallBack  callBack 
)

async update group announcement

Parameters
groupIdgroup id
announcementgroup announcement
callBackcallback
void com.hyphenate.chat.EMGroupManager.asyncUploadGroupSharedFile ( final String  groupId,
final String  filePath,
final EMCallBack  callBack 
)

async upload file to group

Parameters
groupIdgroup id
filePathfile local path
callBackcallback
void com.hyphenate.chat.EMGroupManager.aysncMuteGroupMembers ( final String  groupId,
final List< String >  muteMembers,
final long  duration,
final EMValueCallBack< EMGroup callback 
)

mute/ban group members from posting message for specified duration. ONLY owner or admin can perform this action

Parameters
groupId
muteMembersmute group members
durationmute duration, in milli-seconds
callback
void com.hyphenate.chat.EMGroupManager.blockGroupMessage ( String  groupId) throws HyphenateException

set to disable receiving the group messages

Parameters
groupId
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.blockUser ( String  groupId,
String  username 
) throws HyphenateException

set to block member who will be not allowed to receive any group messages and only the group owner can do it.

Parameters
groupId
usernameuser to be blocked
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.changeGroupDescription ( String  groupId,
String  changedDescription 
) throws HyphenateException

Change group description. ONLY the group own can change group description

Synchronization method will block the current thread

Parameters
groupIdgroup id
changedDescriptionchanged group description
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.changeGroupName ( String  groupId,
String  changedGroupName 
) throws HyphenateException

Change group name. ONLY the group own can change group name

Synchronization method will block the current thread

Parameters
groupIdgroup id to be change name
changedGroupNamenew name
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.changeOwner ( String  groupId,
String  newOwner 
) throws HyphenateException

Transfer group ownership. ONLY group owner can perform this action

Synchronization method will block the current thread

Parameters
groupId
newOwner
Returns
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.createGroup ( String  groupName,
String  desc,
String[]  allMembers,
String  reason,
EMGroupOptions  option 
) throws HyphenateException

create a group on server

Synchronization method will block the current thread

Parameters
groupNamegroup name
descGroup description
allMembersarray of all members, no need include the owner of this group
reasongroup invitation message to invited users
optionoptions for this group
void com.hyphenate.chat.EMGroupManager.declineApplication ( String  username,
String  groupId,
String  reason 
) throws HyphenateException

accept the application of the user to join this group

Parameters
usernameapplication user
groupIdgroup id for application
reasonmessage for decline
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.declineInvitation ( String  groupId,
String  inviter,
String  reason 
) throws HyphenateException

decline group's invitation

Synchronization method will block the current thread

Parameters
groupIdGroup ID
inviterInviter
reasondeclining message
void com.hyphenate.chat.EMGroupManager.deleteGroupSharedFile ( String  groupId,
String  fileId 
) throws HyphenateException

delete file from group

Synchronization method will block the current thread

Parameters
groupIdgroup id
fileIdfile id
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.destroyGroup ( final String  groupId) throws HyphenateException

dismiss the group and only the group owner can do it.

Parameters
groupId
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.downloadGroupSharedFile ( String  groupId,
String  fileId,
String  savePath,
EMCallBack  callBack 
) throws HyphenateException

download the file from group, note the callback only callback progress

Synchronization method will block the current thread

Parameters
groupIdgroup id
fileIdfile id
savePathfile to saved path
callBackcallback
Exceptions
HyphenateException
String com.hyphenate.chat.EMGroupManager.fetchGroupAnnouncement ( String  groupId) throws HyphenateException

get group announcement from server

Parameters
groupId
Returns
Exceptions
HyphenateException
List<String> com.hyphenate.chat.EMGroupManager.fetchGroupBlackList ( String  groupId,
int  pageNum,
int  pageSize 
) throws HyphenateException

fetch black list from server, need owner or administrator's authority to access.

Parameters
groupIdgroup id
pageNumpage number
pageSizepage size
Returns
Exceptions
HyphenateException
EMCursorResult<String> com.hyphenate.chat.EMGroupManager.fetchGroupMembers ( String  groupId,
String  cursor,
int  pageSize 
) throws HyphenateException

Get group's member list, for the last page, EMCursorResult.getCursor() return empty string.

Synchronization method will block the current thread

Parameters
groupId
cursor
pageSize
Returns
Exceptions
HyphenateException
Map<String, Long> com.hyphenate.chat.EMGroupManager.fetchGroupMuteList ( String  groupId,
int  pageNum,
int  pageSize 
) throws HyphenateException

fetch mute list, which contains mute members and mute time, need owner or administrator's authority to access

Parameters
groupId
pageNum
pageSize
Returns
Map.entry.key is username of mute action, Map.entry.value is expired time of banning post action, in milli-seconds
List<EMMucSharedFile> com.hyphenate.chat.EMGroupManager.fetchGroupSharedFileList ( String  groupId,
int  pageNum,
int  pageSize 
) throws HyphenateException

get the shared file list from server

Synchronization method will block the current thread

Parameters
groupIdgroup id
pageNumpage number
pageSizepage size
Returns
Exceptions
HyphenateException
List<EMGroup> com.hyphenate.chat.EMGroupManager.getAllGroups ( )

get all groups from cache

Returns
group List
List<String> com.hyphenate.chat.EMGroupManager.getBlockedUsers ( String  groupId) throws HyphenateException

fetch black list from server. Need owner's authority to access, max returned count is 200

Returns
List
Exceptions
HyphenateException
List<String> com.hyphenate.chat.EMGroupManager.getBlockedUsers ( String  groupId,
int  pageIndex,
int  pageSize 
) throws HyphenateException

Get blacklist of group from server, need owner's authority to access.

Returns
List
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.getGroup ( String  groupId)

get local group from cache by group id

Parameters
groupId
Returns
instance of EMGroup, return null if group is not exist
EMGroup com.hyphenate.chat.EMGroupManager.getGroupFromServer ( String  groupId) throws HyphenateException

get information of group from server.

Parameters
groupId
Returns
instance of EMGroup
EMGroup com.hyphenate.chat.EMGroupManager.getGroupFromServer ( String  groupId,
boolean  fetchMembers 
) throws HyphenateException

fetch group specification

Parameters
fetchMemberswhether need fetch group members, if need fetch members, default action fetch 200 members.
Returns
instance of EMGroup
synchronized List<EMGroup> com.hyphenate.chat.EMGroupManager.getJoinedGroupsFromServer ( ) throws HyphenateException

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

Returns
group list
Exceptions
HyphenateException
synchronized List<EMGroup> com.hyphenate.chat.EMGroupManager.getJoinedGroupsFromServer ( int  pageIndex,
int  pageSize 
) throws HyphenateException

fetch all joined groups from server, only return the group list, not include member list in group. PageIndex start from 1 getGroupFromServer(String groupId) if you want it

Parameters
pageIndexstart from 1
pageSize
Returns
group list
Exceptions
HyphenateException
EMCursorResult<EMGroupInfo> com.hyphenate.chat.EMGroupManager.getPublicGroupsFromServer ( int  pageSize,
String  cursor 
) throws HyphenateException

get all public groups from server

Parameters
pageSizethe number of groups
cursorused to get group page by page, use null if first call
Returns
used to get next page and the group list, for the last page, EMCursorResult.getCursor() is an empty string.
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.inviteUser ( String  groupId,
String[]  beInvitedUsernames,
String  reason 
) throws HyphenateException

invite other users to join the group if the group has been set to allow member to invite

Parameters
groupId
beInvitedUsernamesarray of users to be invited
reasonmessage for invitation
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.joinGroup ( String  groupId) throws HyphenateException

join the group by the group id

Parameters
groupId
void com.hyphenate.chat.EMGroupManager.leaveGroup ( String  groupId) throws HyphenateException

the member exit the group

Parameters
groupId
Exceptions
HyphenateException
synchronized void com.hyphenate.chat.EMGroupManager.loadAllGroups ( )

load all local groups synchronously

EMGroup com.hyphenate.chat.EMGroupManager.muteGroupMembers ( String  groupId,
List< String >  muteMembers,
long  duration 
) throws HyphenateException

mute/ban group members from posting message for specified duration. ONLY owner or admin can perform this action

Parameters
groupId
muteMembersmute member list
durationmute duration
Returns
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.removeGroupAdmin ( String  groupId,
String  admin 
) throws HyphenateException

remove group administrator, need owner's authority to access

Synchronization method will block the current thread

Parameters
groupId
admin
Returns
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.removeGroupChangeListener ( EMGroupChangeListener  listener)

remove group change listener

Parameters
listener
void com.hyphenate.chat.EMGroupManager.removeUserFromGroup ( final String  groupId,
final String  username 
) throws HyphenateException

remove the member from the group and only the group owner can do it.

Parameters
groupId
usernameuser id to be removed
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.unblockGroupMessage ( String  groupId) throws HyphenateException

set to enable to receive the group message again

Parameters
groupId
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.unblockUser ( String  groupId,
String  username 
) throws HyphenateException

remove the blocked user from the group balcklist

Parameters
groupId
username
EMGroup com.hyphenate.chat.EMGroupManager.unMuteGroupMembers ( String  groupId,
List< String >  members 
) throws HyphenateException

Unmute group members, need owner or administrator's authority to access.

Parameters
groupId
members
Returns
Exceptions
HyphenateException
void com.hyphenate.chat.EMGroupManager.updateGroupAnnouncement ( String  groupId,
String  announcement 
) throws HyphenateException

update group announcement

Parameters
groupIdgroup id
announcementgroup announcement
Exceptions
HyphenateException
EMGroup com.hyphenate.chat.EMGroupManager.updateGroupExtension ( String  groupId,
String  extension 
) throws HyphenateException

update group extension

Parameters
groupIdgroup id
extensionextension string
EMMucSharedFile com.hyphenate.chat.EMGroupManager.uploadGroupSharedFile ( String  groupId,
String  filePath,
EMCallBack  callBack 
) throws HyphenateException

upload file to group, note the callback only callback the progress

Parameters
groupIdgroup id
filePathfile local path
callBackcallback
Returns
Exceptions
HyphenateException

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