Chat SDK for Android v1.2.1
agora java chat SDK
Public Member Functions | List of all members
io.agora.chat.ChatRoomManager Class Reference

Public Member Functions

void addChatRoomChangeListener (ChatRoomChangeListener listener)
 
void removeChatRoomChangeListener (ChatRoomChangeListener listener)
 
void removeChatRoomListener (ChatRoomChangeListener listener)
 
void joinChatRoom (final String roomId, final ValueCallBack< ChatRoom > callback)
 
void leaveChatRoom (final String roomId)
 
void leaveChatRoom (final String roomId, CallBack callback)
 
PageResult< ChatRoomfetchPublicChatRoomsFromServer (int pageNum, int pageSize) throws ChatException
 
CursorResult< ChatRoomfetchPublicChatRoomsFromServer (int pageSize, String cursor) throws ChatException
 
void asyncFetchPublicChatRoomsFromServer (final int pageSize, final String cursor, final ValueCallBack< CursorResult< ChatRoom > > callback)
 
void asyncFetchPublicChatRoomsFromServer (final int pageNum, final int pageSize, final ValueCallBack< PageResult< ChatRoom > > callback)
 
ChatRoom fetchChatRoomFromServer (String roomId) throws ChatException
 
ChatRoom fetchChatRoomFromServer (String roomId, boolean fetchMembers) throws ChatException
 
void asyncFetchChatRoomFromServer (final String roomId, final ValueCallBack< ChatRoom > callback)
 
ChatRoom getChatRoom (String roomId)
 
List< ChatRoomgetAllChatRooms ()
 
ChatRoom createChatRoom (String subject, String description, String welcomeMessage, int maxUserCount, List< String > members) throws ChatException
 
void asyncCreateChatRoom (final String subject, final String description, final String welcomeMessage, final int maxUserCount, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
void destroyChatRoom (String chatRoomId) throws ChatException
 
void asyncDestroyChatRoom (final String chatRoomId, final CallBack callBack)
 
ChatRoom changeChatRoomSubject (String chatRoomId, String newSubject) throws ChatException
 
void asyncChangeChatRoomSubject (final String chatRoomId, final String newSubject, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom changeChatroomDescription (String chatRoomId, String newDescription) throws ChatException
 
void asyncChangeChatroomDescription (final String chatRoomId, final String newDescription, final ValueCallBack< ChatRoom > callBack)
 
CursorResult< String > fetchChatRoomMembers (String chatRoomId, String cursor, int pageSize) throws ChatException
 
void asyncFetchChatRoomMembers (final String chatRoomId, final String cursor, final int pageSize, final ValueCallBack< CursorResult< String > > callBack)
 
ChatRoom muteChatRoomMembers (String chatRoomId, List< String > muteMembers, long duration) throws ChatException
 
void asyncMuteChatRoomMembers (final String chatRoomId, final List< String > muteMembers, final long duration, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom unMuteChatRoomMembers (String chatRoomId, List< String > members) throws ChatException
 
void asyncUnMuteChatRoomMembers (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom changeOwner (String chatRoomId, String newOwner) throws ChatException
 
void asyncChangeOwner (final String chatRoomId, final String newOwner, final ValueCallBack< ChatRoom > callBack) throws ChatException
 
ChatRoom addChatRoomAdmin (String chatRoomId, String admin) throws ChatException
 
void asyncAddChatRoomAdmin (final String chatRoomId, final String admin, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom removeChatRoomAdmin (String chatRoomId, String admin) throws ChatException
 
void asyncRemoveChatRoomAdmin (final String chatRoomId, final String admin, final ValueCallBack< ChatRoom > callBack)
 
Map< String, Long > fetchChatRoomMuteList (String chatRoomId, int pageNum, int pageSize) throws ChatException
 
void asyncFetchChatRoomMuteList (final String chatRoomId, final int pageNum, final int pageSize, final ValueCallBack< Map< String, Long > > callBack)
 
ChatRoom removeChatRoomMembers (String chatRoomId, List< String > members) throws ChatException
 
void asyncRemoveChatRoomMembers (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom blockChatroomMembers (String chatRoomId, List< String > members) throws ChatException
 
void asyncBlockChatroomMembers (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
ChatRoom unblockChatRoomMembers (String chatRoomId, List< String > members) throws ChatException
 
void asyncUnBlockChatRoomMembers (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
List< String > fetchChatRoomBlackList (String chatRoomId, int pageNum, int pageSize) throws ChatException
 
void asyncFetchChatRoomBlackList (final String chatRoomId, final int pageNum, final int pageSize, final ValueCallBack< List< String > > callBack)
 
void addToChatRoomWhiteList (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
void removeFromChatRoomWhiteList (final String chatRoomId, final List< String > members, final ValueCallBack< ChatRoom > callBack)
 
void checkIfInChatRoomWhiteList (final String chatRoomId, ValueCallBack< Boolean > callBack)
 
void asyncCheckIfInMuteList (final String chatRoomId, ValueCallBack< Boolean > callBack)
 
void fetchChatRoomWhiteList (final String chatRoomId, final ValueCallBack< List< String > > callBack)
 
void muteAllMembers (final String chatRoomId, final ValueCallBack< ChatRoom > callBack)
 
void unmuteAllMembers (final String chatRoomId, final ValueCallBack< ChatRoom > callBack)
 
void updateChatRoomAnnouncement (String chatRoomId, String announcement) throws ChatException
 
void asyncUpdateChatRoomAnnouncement (final String chatRoomId, final String announcement, final CallBack callBack)
 
String fetchChatRoomAnnouncement (String chatRoomId) throws ChatException
 
void asyncFetchChatRoomAnnouncement (final String chatRoomId, final ValueCallBack< String > callBack)
 
void asyncSetChatroomAttributes (String chatRoomId, Map< String, String > attributeMap, boolean autoDelete, @NonNull final ResultCallBack< Map< String, Integer > > callBack)
 
void asyncSetChatroomAttribute (String chatRoomId, String key, String value, boolean autoDelete, @NonNull final CallBack callBack)
 
void asyncSetChatroomAttributesForced (String chatRoomId, Map< String, String > attributeMap, boolean autoDelete, @NonNull final ResultCallBack< Map< String, Integer > > callBack)
 
void asyncSetChatroomAttributeForced (String chatRoomId, String key, String value, boolean autoDelete, @NonNull final CallBack callBack)
 
void asyncFetchChatroomAttributesFromServer (String chatRoomId, List< String > keyList, @NonNull final ValueCallBack< Map< String, String > > callBack)
 
void asyncFetchChatRoomAllAttributesFromServer (String chatRoomId, @NonNull final ValueCallBack< Map< String, String > > callBack)
 
void asyncRemoveChatRoomAttributesFromServer (String chatRoomId, List< String > keyList, @NonNull final ResultCallBack< Map< String, Integer > > callBack)
 
void asyncRemoveChatRoomAttributeFromServer (String chatRoomId, String key, @NonNull final CallBack callBack)
 
void asyncRemoveChatRoomAttributesFromServerForced (String chatRoomId, List< String > keyList, @NonNull final ResultCallBack< Map< String, Integer > > callBack)
 
void asyncRemoveChatRoomAttributeFromServerForced (String chatRoomId, String key, @NonNull final CallBack callBack)
 

Detailed Description

The chat room manager, which manages users joining and existing the chat room and getting the chat room list, and manages member privileges. For example, joining a chat room:

ChatClient.getInstance().chatroomManager().joinChatRoom(conversationId, new ValueCallBack<ChatRoom>() {
public void onSuccess(ChatRoom value) {
//Processing logic for successful chat room joining.
}
public void onError(int error, String errorMsg) {
//Processing logic for chat room joining failures.
}
});

Member Function Documentation

◆ addChatRoomAdmin()

ChatRoom io.agora.chat.ChatRoomManager.addChatRoomAdmin ( String  chatRoomId,
String  admin 
) throws ChatException

Adds a chat room admin.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncAddChatRoomAdmin(String, String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
adminThe member to be set as the chat room admin.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ addChatRoomChangeListener()

void io.agora.chat.ChatRoomManager.addChatRoomChangeListener ( ChatRoomChangeListener  listener)

Adds a chat room event listener.

Note
Chat room destruction, member entry and exit, mute, and allow list changes among other chat room operations can be listened for by setting ChatRoomChangeListener.

Chat room event listeners added with this method can be removed by calling removeChatRoomListener(ChatRoomChangeListener).

Parameters
listenerA chat room event listener. See ChatRoomChangeListener.

◆ addToChatRoomWhiteList()

void io.agora.chat.ChatRoomManager.addToChatRoomWhiteList ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Adds members to the allow list of the chat room.

Note
Only the chat room owner or admin can call this method.

When muteAllMembers(String, ValueCallBack) executed by the chat room owner or admin, does not work for members on the allow list.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be added to the allowlist.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncAddChatRoomAdmin()

void io.agora.chat.ChatRoomManager.asyncAddChatRoomAdmin ( final String  chatRoomId,
final String  admin,
final ValueCallBack< ChatRoom callBack 
)

Adds a chat room admin.

Note
Only the chat room owner can call this method.

For the asynchronous method, see addChatRoomAdmin(String, String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
adminThe member to be set as the chat room admin.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncBlockChatroomMembers()

void io.agora.chat.ChatRoomManager.asyncBlockChatroomMembers ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Adds members to the block list of the chat room.

Note
Only the chat room owner or admin can call this method.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be added to block list.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).

◆ asyncChangeChatroomDescription()

void io.agora.chat.ChatRoomManager.asyncChangeChatroomDescription ( final String  chatRoomId,
final String  newDescription,
final ValueCallBack< ChatRoom callBack 
)

Modifies the chat room description.

Note
Only the chat room owner can call this method.

For the synchronous method, see changeChatroomDescription(String, String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
newDescriptionThe modified chat room description.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncChangeChatRoomSubject()

void io.agora.chat.ChatRoomManager.asyncChangeChatRoomSubject ( final String  chatRoomId,
final String  newSubject,
final ValueCallBack< ChatRoom callBack 
)

Changes the chat room name.

Note
Only the chat room owner can call this method.

For the synchronous method, see changeChatRoomSubject(String, String).

This is an asynchronous method.

Parameters
chatRoomIdA chat room ID.
newSubjectThe modified chat room name.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncChangeOwner()

void io.agora.chat.ChatRoomManager.asyncChangeOwner ( final String  chatRoomId,
final String  newOwner,
final ValueCallBack< ChatRoom callBack 
) throws ChatException

Transfers the chat room ownership.

Note
Only the chat room owner can call this method.

For the synchronous method, see changeOwner(String, String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
newOwnerThe new owner of the chat room.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncCheckIfInMuteList()

void io.agora.chat.ChatRoomManager.asyncCheckIfInMuteList ( final String  chatRoomId,
ValueCallBack< Boolean >  callBack 
)

Checks whether the current member is muted or not.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object) to show whether the member is be muted or not; if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncCreateChatRoom()

void io.agora.chat.ChatRoomManager.asyncCreateChatRoom ( final String  subject,
final String  description,
final String  welcomeMessage,
final int  maxUserCount,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Creates a chat room.

For the synchronous method, see createChatRoom(String, String, String, int, List).

This is an asynchronous method.

Parameters
subjectThe chat room name.
descriptionThe chat room description.
welcomeMessageA welcome message for inviting users to join the chat room.
maxUserCountThe maximum number of members allowed in the chat room.
membersThe list of users invited to join the chat room.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncDestroyChatRoom()

void io.agora.chat.ChatRoomManager.asyncDestroyChatRoom ( final String  chatRoomId,
final CallBack  callBack 
)

Destroys a chat room.

Note
Only the chat room owner can call this method.

For the synchronous method, see destroyChatRoom(String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ asyncFetchChatRoomAllAttributesFromServer()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomAllAttributesFromServer ( String  chatRoomId,
@NonNull final ValueCallBack< Map< String, String > >  callBack 
)

Gets all the custom attributes of a chat room.

This is an asynchronous method.

For the synchronous method, see fetchChatroomAttributes(String,List).

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchChatRoomAnnouncement()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomAnnouncement ( final String  chatRoomId,
final ValueCallBack< String >  callBack 
)

Gets the chat room announcement from the server.

For the synchronous method, see fetchChatRoomAnnouncement(String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object) and returns the chat room announcement; if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchChatroomAttributesFromServer()

void io.agora.chat.ChatRoomManager.asyncFetchChatroomAttributesFromServer ( String  chatRoomId,
List< String >  keyList,
@NonNull final ValueCallBack< Map< String, String > >  callBack 
)

Gets the list of custom chat room attributes based on the attribute key list.

This is an asynchronous method.

For the synchronous method, see fetchChatroomAttributes(String,List).

Parameters
chatRoomIdThe chat room ID.
keyListThe list of chat room attribute keys. If you pass null, the SDK returns all custom attributes of the chat room.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchChatRoomBlackList()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomBlackList ( final String  chatRoomId,
final int  pageNum,
final int  pageSize,
final ValueCallBack< List< String > >  callBack 
)

Gets the chat room block list with pagination.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see fetchChatRoomBlackList(String, int, int).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
pageNumThe page number, starting from 1.
pageSizeThe number of members on the block list that you expect to get on each page. The value range is [1,50].
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object) and returns the block list of the chat room; If this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchChatRoomFromServer()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomFromServer ( final String  roomId,
final ValueCallBack< ChatRoom callback 
)

Gets details of a chat room from the server.

Note
This method does not get the chat room member list.

This is an asynchronous method.

For the synchronous method, see fetchChatRoomFromServer(String).

Parameters
roomIdThe chat room ID.
callbackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, callsValueCallBack#onError(int, String).

◆ asyncFetchChatRoomMembers()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomMembers ( final String  chatRoomId,
final String  cursor,
final int  pageSize,
final ValueCallBack< CursorResult< String > >  callBack 
)

Gets the chat room member list.

Note
When CursorResult#getCursor() is an empty string ("") amid the result, all data is fetched.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
cursorThe cursor position from which to start getting data. At the first call, if you set the cursor as "null", the SDK gets chat room members in the reverse chronological order of when members joined the chat room.
pageSizeThe number of members that you expect to get on each page. The value range is [1,50].
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchChatRoomMuteList()

void io.agora.chat.ChatRoomManager.asyncFetchChatRoomMuteList ( final String  chatRoomId,
final int  pageNum,
final int  pageSize,
final ValueCallBack< Map< String, Long > >  callBack 
)

Gets the list of muted chat room members from the server.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see fetchChatRoomMuteList(String, int, int).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
pageNumThe page number, starting from 1.
pageSizeThe number of muted members that you expect to get on each page. The value range is [1,50].
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchPublicChatRoomsFromServer() [1/2]

void io.agora.chat.ChatRoomManager.asyncFetchPublicChatRoomsFromServer ( final int  pageNum,
final int  pageSize,
final ValueCallBack< PageResult< ChatRoom > >  callback 
)

Gets chat room data from the server with pagination.

This is an asynchronous method.

Parameters
pageNumThe page number, starting from 1.
pageSizeThe number of records that you expect to get on each page. The value range is [1,50].
callbackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object). If this call fails, calls ValueCallBack#onError(int, String).

◆ asyncFetchPublicChatRoomsFromServer() [2/2]

void io.agora.chat.ChatRoomManager.asyncFetchPublicChatRoomsFromServer ( final int  pageSize,
final String  cursor,
final ValueCallBack< CursorResult< ChatRoom > >  callback 
)

Gets chat room data from the server with pagination.

Note
When CursorResult#getCursor() is an empty string ("") amid the result, all data is fetched.

This is an asynchronous method.

Parameters
pageSizeThe number of records that you expect to get on each page. The value range is [1,50].
cursorThe cursor position from which to start getting data.
callbackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).
Deprecated:
Deprecated. Please use asyncFetchPublicChatRoomsFromServer(int, int, ValueCallBack) instead.

◆ asyncMuteChatRoomMembers()

void io.agora.chat.ChatRoomManager.asyncMuteChatRoomMembers ( final String  chatRoomId,
final List< String >  muteMembers,
final long  duration,
final ValueCallBack< ChatRoom callBack 
)

Mutes members in a chat room.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see muteChatRoomMembers(String, List, long).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
muteMembersThe list of members to be muted.
durationThe mute duration in milliseconds. The value -1 indicates that the members are muted permanently.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncRemoveChatRoomAdmin()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomAdmin ( final String  chatRoomId,
final String  admin,
final ValueCallBack< ChatRoom callBack 
)

Removes administrative privileges of a chat room admin.

Note
Only the chat room owner can call this method.

For the synchronous method, see removeChatRoomAdmin(String, String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
adminThe chat room admin whose administrative privileges are to be removed.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncRemoveChatRoomAttributeFromServer()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomAttributeFromServer ( String  chatRoomId,
String  key,
@NonNull final CallBack  callBack 
)

Removes a custom chat room attribute.

Note
This method does not remove attributes set by other members.

This is an asynchronous method.

For the synchronous method, see removeChatroomAttribute(String,List)

Parameters
chatRoomIdThe chat room ID.
keyThe key of the custom chat room attribute to remove.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ asyncRemoveChatRoomAttributeFromServerForced()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomAttributeFromServerForced ( String  chatRoomId,
String  key,
@NonNull final CallBack  callBack 
)

Removes a custom chat room attribute forcibly.

Note
This method removes attributes set by other members.

This is an asynchronous method.

For the synchronous method, see removeChatroomAttributeForced(String,List).

Parameters
chatRoomIdThe chat room ID.
keyThe key of the custom chat room attribute to remove.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ asyncRemoveChatRoomAttributesFromServer()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomAttributesFromServer ( String  chatRoomId,
List< String >  keyList,
@NonNull final ResultCallBack< Map< String, Integer > >  callBack 
)

Removes custom chat room attributes by the attribute key list.

Note
This method does not remove attributes set by other members.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
keyListThe key list of the custom chat room attributes to remove.
callBackThe completion callback. calls ResultCallBack#onResult(int,Object); return Object is Map={"k1":703}, A description of the exception. See Error. EXCEED_SERVICE_LIMIT = 4; INVALID_PARAM = 110; QUERY_PARAM_REACHES_LIMIT = 112; CHATROOM_PERMISSION_DENIED = 703;

◆ asyncRemoveChatRoomAttributesFromServerForced()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomAttributesFromServerForced ( String  chatRoomId,
List< String >  keyList,
@NonNull final ResultCallBack< Map< String, Integer > >  callBack 
)

Removes custom chat room attributes forcibly.

Note
This method removes attributes set by other members.

This is an asynchronous method.

For the synchronous method, see removeChatroomAttributeForced(String,List).

Parameters
chatRoomIdThe chat room ID.
keyListThe key list of the custom chat room attributes to remove.
callBackThe completion callback. calls ResultCallBack#onResult(int, Object) (int,Object)}; return Object is Map={"k1":703}, A description of the exception. See Error. EXCEED_SERVICE_LIMIT = 4; INVALID_PARAM = 110; QUERY_PARAM_REACHES_LIMIT = 112; CHATROOM_PERMISSION_DENIED = 703;

◆ asyncRemoveChatRoomMembers()

void io.agora.chat.ChatRoomManager.asyncRemoveChatRoomMembers ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Removes members from a chat room.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see removeChatRoomMembers(String, List).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be removed.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncSetChatroomAttribute()

void io.agora.chat.ChatRoomManager.asyncSetChatroomAttribute ( String  chatRoomId,
String  key,
String  value,
boolean  autoDelete,
@NonNull final CallBack  callBack 
)

Sets a custom chat room attribute.

Note
This method does not overwrite attributes set by other members.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
keyThe chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
  • 26 lowercase English letters (a-z)
  • 26 uppercase English letters (A-Z)
  • 10 numbers (0-9)
  • "_", "-", "."
valueThe chat room attribute value. The attribute value can contain a maximum of 4096 characters. The total length of custom chat room attributes cannot exceed 10 GB for each app.
autoDeleteWhether to delete the chat room attribute set by the member when he or she exits the chat room.
  • (Default)true:Yes.
  • false: No.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ asyncSetChatroomAttributeForced()

void io.agora.chat.ChatRoomManager.asyncSetChatroomAttributeForced ( String  chatRoomId,
String  key,
String  value,
boolean  autoDelete,
@NonNull final CallBack  callBack 
)

Sets a custom chat room attribute forcibly.

Note
This method overwrites attributes set by other members.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
keyThe chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
  • 26 lowercase English letters (a-z)
  • 26 uppercase English letters (A-Z)
  • 10 numbers (0-9)
  • "_", "-", "."
valueThe chat room attribute value. The attribute value can contain a maximum of 4096 characters. The total length of custom chat room attributes cannot exceed 10 GB for each app.
autoDeleteWhether to delete the chat room attributes set by the member when he or she exits the chat room.
  • (Default)true:Yes.
  • false: No.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ asyncSetChatroomAttributes()

void io.agora.chat.ChatRoomManager.asyncSetChatroomAttributes ( String  chatRoomId,
Map< String, String >  attributeMap,
boolean  autoDelete,
@NonNull final ResultCallBack< Map< String, Integer > >  callBack 
)

Adds custom chat room attributes.

Note
This method does not overwrite attributes set by other members.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
attributeMapThe new chat room attributes Key-Value. A single key cannot exceed 128 characters; the total number of keys in a chat room cannot exceed 100. A single Value can not exceed 4096 characters. The total attribute can not exceed 10 GB.
autoDeleteWhether to delete the chat room attributes set by the member when he or she exits the chat room.
  • (Default)true:Yes.
  • false: No.
callBackThe completion callback. calls ResultCallBack#onResult(int, Object); return Object is Map={"k1":703}, A description of the exception. See Error. EXCEED_SERVICE_LIMIT = 4; INVALID_PARAM = 110; QUERY_PARAM_REACHES_LIMIT = 112; CHATROOM_PERMISSION_DENIED = 703;

◆ asyncSetChatroomAttributesForced()

void io.agora.chat.ChatRoomManager.asyncSetChatroomAttributesForced ( String  chatRoomId,
Map< String, String >  attributeMap,
boolean  autoDelete,
@NonNull final ResultCallBack< Map< String, Integer > >  callBack 
)

Sets custom chat room attributes forcibly.

Note
This method overwrites attributes set by other members.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
attributeMapThe map of new chat room attributes in key-value format. In a key-value pair, the key is the attribute name that can contain 128 characters at most; the value is the attribute value that cannot exceed 4096 characters. A chat room can have a maximum of 100 custom attributes and the total length of custom chat room attributes cannot exceed 10 GB for each app.
autoDeleteWhether to delete the chat room attributes set by the member when he or she exits the chat room.
  • (Default)true:Yes.
  • false: No.
callBackThe completion callback. calls ResultCallBack#onResult(int,Object); return Object is Map={"k1":703}, A description of the exception. See Error. EXCEED_SERVICE_LIMIT = 4; INVALID_PARAM = 110; QUERY_PARAM_REACHES_LIMIT = 112; CHATROOM_PERMISSION_DENIED = 703;

◆ asyncUnBlockChatRoomMembers()

void io.agora.chat.ChatRoomManager.asyncUnBlockChatRoomMembers ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Removes members from the block list of the chat room.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see unblockChatRoomMembers(String, List).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be removed from the block list.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncUnMuteChatRoomMembers()

void io.agora.chat.ChatRoomManager.asyncUnMuteChatRoomMembers ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Unmutes members in a chat room.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see unMuteChatRoomMembers(String, List).

This is an asynchronous method.

Parameters
chatRoomIdA chat room ID.
membersThe list of members to be unmuted.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ asyncUpdateChatRoomAnnouncement()

void io.agora.chat.ChatRoomManager.asyncUpdateChatRoomAnnouncement ( final String  chatRoomId,
final String  announcement,
final CallBack  callBack 
)

Updates the chat room announcement.

Note
Only the chat room owner or admin can call this method.

For the synchronous method, see updateChatRoomAnnouncement(String, String).

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID
announcementThe modified announcement content.
callBackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ blockChatroomMembers()

ChatRoom io.agora.chat.ChatRoomManager.blockChatroomMembers ( String  chatRoomId,
List< String >  members 
) throws ChatException

Adds members to the block list of the chat room.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncBlockChatroomMembers(String, List, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be added to block list.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ changeChatroomDescription()

ChatRoom io.agora.chat.ChatRoomManager.changeChatroomDescription ( String  chatRoomId,
String  newDescription 
) throws ChatException

Modifies the chat room description.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncChangeChatroomDescription(String, String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
newDescriptionThe modified chat room description.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ changeChatRoomSubject()

ChatRoom io.agora.chat.ChatRoomManager.changeChatRoomSubject ( String  chatRoomId,
String  newSubject 
) throws ChatException

Changes the chat room name.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncChangeChatRoomSubject(String, String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
newSubjectThe modified chat room name.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error

◆ changeOwner()

ChatRoom io.agora.chat.ChatRoomManager.changeOwner ( String  chatRoomId,
String  newOwner 
) throws ChatException

Transfers the chat room ownership.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncChangeOwner(String, String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdA chat room ID.
newOwnerThe new owner of the chat room.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ checkIfInChatRoomWhiteList()

void io.agora.chat.ChatRoomManager.checkIfInChatRoomWhiteList ( final String  chatRoomId,
ValueCallBack< Boolean >  callBack 
)

Checks whether the current member is on the chat room block list.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object) to show whether the member is on the block list; if this call fails, calls ValueCallBack#onError(int, String).

◆ createChatRoom()

ChatRoom io.agora.chat.ChatRoomManager.createChatRoom ( String  subject,
String  description,
String  welcomeMessage,
int  maxUserCount,
List< String >  members 
) throws ChatException

Creates a chat room.

@Note For the asynchronous method, see asyncCreateChatRoom(String, String, String, int, List, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
subjectThe chat room name.
descriptionThe chat room description.
welcomeMessageA welcome message inviting users to join the chat room.
maxUserCountThe maximum number of members allowed in the chat room.
membersThe list of users invited to join the chat room.
Returns
ChatRoom The created chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ destroyChatRoom()

void io.agora.chat.ChatRoomManager.destroyChatRoom ( String  chatRoomId) throws ChatException

Destroys a chat room.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncDestroyChatRoom(String, CallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomAnnouncement()

String io.agora.chat.ChatRoomManager.fetchChatRoomAnnouncement ( String  chatRoomId) throws ChatException

Gets the chat room announcement from the server.

For the asynchronous method, see asyncFetchChatRoomAnnouncement(String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
Returns
The chat room announcement.
Exceptions
ChatExceptionA description of the exception. See Error

◆ fetchChatRoomBlackList()

List< String > io.agora.chat.ChatRoomManager.fetchChatRoomBlackList ( String  chatRoomId,
int  pageNum,
int  pageSize 
) throws ChatException

Gets the chat room block list with pagination.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncFetchChatRoomBlackList(String, int, int, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
pageNumThe page number, starting from 1.
pageSizeThe number of members on the block list that you expect to get on each page. The value range is [1,50].
Returns
The block list of the chat room.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomFromServer() [1/2]

ChatRoom io.agora.chat.ChatRoomManager.fetchChatRoomFromServer ( String  roomId) throws ChatException

Gets details of a chat room from the server.

Note
This method does not get the member list.

This is a synchronous method and blocks the current thread.

For the asynchronous method, see asyncFetchChatRoomFromServer(String, ValueCallBack).

Parameters
roomIdThe chat room ID.
Returns
ChatRoom The chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomFromServer() [2/2]

ChatRoom io.agora.chat.ChatRoomManager.fetchChatRoomFromServer ( String  roomId,
boolean  fetchMembers 
) throws ChatException

Gets details of a chat room from the server.

Note
The member list, if required, can contain at most 200 members by default. For more members, call ChatRoomManager#fetchChatRoomMembers(String, String, int).

This is a synchronous method and blocks the current thread.

Parameters
roomIdThe chat room ID.
fetchMembersWhether to get chat room members.
Returns
ChatRoom The chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomMembers()

CursorResult< String > io.agora.chat.ChatRoomManager.fetchChatRoomMembers ( String  chatRoomId,
String  cursor,
int  pageSize 
) throws ChatException

Gets the chat room member list.

Note
When CursorResult#getCursor() is an empty string ("") amid the result, all data is fetched.

For the asynchronous method, see asyncFetchChatRoomMembers(String, String, int, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
cursorThe cursor position from which to start getting data. At the first call, if you set the cursor as "null", the SDK gets chat room members in the reverse chronological order of when members joined the chat room.
pageSizeThe number of members that you expect to get on each page. The value range is [1,50].
Returns
The list of chat room members and the cursor for the next query. See CursorResult.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomMuteList()

Map< String, Long > io.agora.chat.ChatRoomManager.fetchChatRoomMuteList ( String  chatRoomId,
int  pageNum,
int  pageSize 
) throws ChatException

Gets the list of muted chat room members from the server.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncFetchChatRoomMuteList(String, int, int, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
pageNumThe page number, starting from 1.
pageSizeThe number of muted members that you expect to get on each page. The value range is [1,50].
Returns
A map which contains the muted member ID and mute duration, where the key of each entry is the ID of a muted member and the value is the mute duration in milliseconds.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchChatRoomWhiteList()

void io.agora.chat.ChatRoomManager.fetchChatRoomWhiteList ( final String  chatRoomId,
final ValueCallBack< List< String > >  callBack 
)

Gets the chat room allow list from the server.

Note
Only the chat room owner or admin can call this method.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).

◆ fetchPublicChatRoomsFromServer() [1/2]

PageResult< ChatRoom > io.agora.chat.ChatRoomManager.fetchPublicChatRoomsFromServer ( int  pageNum,
int  pageSize 
) throws ChatException

Gets chat room data from the server with pagination.

This is a synchronous method and blocks the current thread.

The asynchronous method asyncFetchPublicChatRoomsFromServer(int, int, ValueCallBack) can be used.

Parameters
pageNumThe page number, starting from 1.
pageSizeThe number of records that you expect to get on each page. The value range is [1,50].
Returns
Chat room data. See PageResult.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ fetchPublicChatRoomsFromServer() [2/2]

CursorResult< ChatRoom > io.agora.chat.ChatRoomManager.fetchPublicChatRoomsFromServer ( int  pageSize,
String  cursor 
) throws ChatException

Gets chat room data from the server with pagination.

Note
When CursorResult#getCursor() is an empty string ("") amid the result, all data is fetched.

As this method is time-consuming, the asynchronous method asyncFetchPublicChatRoomsFromServer(int, String, ValueCallBack) can be used.

This is a synchronous method and blocks the current thread.

Parameters
pageSizeThe number of records per page. The value range is [1,50].
cursorThe cursor position from which to start getting data.
Returns
Chat room data. See CursorResult.
Exceptions
ChatExceptionA description of the exception. See Error.
Deprecated:
Deprecated. Please use fetchPublicChatRoomsFromServer(int, int) instead.

◆ getAllChatRooms()

List< ChatRoom > io.agora.chat.ChatRoomManager.getAllChatRooms ( )

Gets the list of chat rooms in the memory.

Note
Data can be returned upon the call of this method only after one of the following methods is called:
Returns
The list of chat rooms maintained by ChatRoomManager.
Deprecated:
Deprecated.

◆ getChatRoom()

ChatRoom io.agora.chat.ChatRoomManager.getChatRoom ( String  roomId)

Gets the chat room in the memory.

Parameters
roomIdThe chat room ID.
Returns
The chat room instance. The SDK returns null if the chat room is not found in the memory.

◆ joinChatRoom()

void io.agora.chat.ChatRoomManager.joinChatRoom ( final String  roomId,
final ValueCallBack< ChatRoom callback 
)

Joins a chat room.

Note
To exit the chat room, call leaveChatRoom(String, CallBack) .

This is an asynchronous method.

Parameters
roomIdThe ID of the chat room to join.
callbackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object) and returns the chat room object; if this call fails, calls ValueCallBack#onError(int, String), where the first parameter is the error code and the second is the error message.

◆ leaveChatRoom() [1/2]

void io.agora.chat.ChatRoomManager.leaveChatRoom ( final String  roomId)

Exits a chat room.

Note
A user that joins a chat room using joinChatRoom(String, ValueCallBack) can call the leaveChatRoom method to exit the chat room.

This is an asynchronous method.

Parameters
roomIdThe ID of the chat room to exit.

◆ leaveChatRoom() [2/2]

void io.agora.chat.ChatRoomManager.leaveChatRoom ( final String  roomId,
CallBack  callback 
)

Exits a chat room.

A user that joins a chat room using joinChatRoom(String, ValueCallBack) can call the leaveChatRoom method to exit the chat room.

This is an asynchronous method.

Parameters
roomIdThe ID of the chat room to exit.
callbackThe completion callback. If this call succeeds, calls CallBack#onSuccess(); if this call fails, calls CallBack#onError(int, String).

◆ muteAllMembers()

void io.agora.chat.ChatRoomManager.muteAllMembers ( final String  chatRoomId,
final ValueCallBack< ChatRoom callBack 
)

Mutes all members.

Note
Only the chat room owner or admin can call this method.

This method does not work for the chat room owner, admin, and members on the chat room block list.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ muteChatRoomMembers()

ChatRoom io.agora.chat.ChatRoomManager.muteChatRoomMembers ( String  chatRoomId,
List< String >  muteMembers,
long  duration 
) throws ChatException

Mutes members in a chat room.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncMuteChatRoomMembers(String, List, long, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
muteMembersThe list of members to be muted.
durationThe mute duration in milliseconds. The value -1 indicates that the members are muted permanently.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ removeChatRoomAdmin()

ChatRoom io.agora.chat.ChatRoomManager.removeChatRoomAdmin ( String  chatRoomId,
String  admin 
) throws ChatException

Removes administrative privileges of a chat room admin.

Note
Only the chat room owner can call this method.

For the asynchronous method, see asyncRemoveChatRoomAdmin(String, String, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
adminThe chat room admin whose administrative privileges are to be removed.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ removeChatRoomChangeListener()

void io.agora.chat.ChatRoomManager.removeChatRoomChangeListener ( ChatRoomChangeListener  listener)

Removes a chat room event listener.

Note
This method removes a chat room event listener added with addChatRoomChangeListener(ChatRoomChangeListener).

Currently, removeChatRoomListener(ChatRoomChangeListener) is recommended to remove a chat room event listener.

Parameters
listenerThe chat room listener to be removed.
Deprecated:
Deprecated. Please use ChatRoomManager#removeChatRoomListener(ChatRoomChangeListener) instead.

◆ removeChatRoomListener()

void io.agora.chat.ChatRoomManager.removeChatRoomListener ( ChatRoomChangeListener  listener)

Removes the chat room event listener.

Note
This method removes the chat room event listener added with addChatRoomChangeListener(ChatRoomChangeListener).
Parameters
listenerThe chat room event listener to be removed.

◆ removeChatRoomMembers()

ChatRoom io.agora.chat.ChatRoomManager.removeChatRoomMembers ( String  chatRoomId,
List< String >  members 
) throws ChatException

Removes members from a chat room.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncRemoveChatRoomMembers(String, List, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be removed.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ removeFromChatRoomWhiteList()

void io.agora.chat.ChatRoomManager.removeFromChatRoomWhiteList ( final String  chatRoomId,
final List< String >  members,
final ValueCallBack< ChatRoom callBack 
)

Removes members from the chat room block list.

Note
Only the chat room owner or admin can call this method.

For members removed from the block list, muteAllMembers(String, ValueCallBack) works.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be removed from the chat room block list.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); if this call fails, calls ValueCallBack#onError(int, String).

◆ unblockChatRoomMembers()

ChatRoom io.agora.chat.ChatRoomManager.unblockChatRoomMembers ( String  chatRoomId,
List< String >  members 
) throws ChatException

Removes members from the block list of the chat room.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncBlockChatroomMembers(String, List, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be removed from the block list.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ unmuteAllMembers()

void io.agora.chat.ChatRoomManager.unmuteAllMembers ( final String  chatRoomId,
final ValueCallBack< ChatRoom callBack 
)

Unmutes all members.

Note
Only the chat room owner or admin can call this method.

This is an asynchronous method.

Parameters
chatRoomIdThe chat room ID.
callBackThe completion callback. If this call succeeds, calls ValueCallBack#onSuccess(Object); If this call fails, calls ValueCallBack#onError(int, String).

◆ unMuteChatRoomMembers()

ChatRoom io.agora.chat.ChatRoomManager.unMuteChatRoomMembers ( String  chatRoomId,
List< String >  members 
) throws ChatException

Unmutes members in a chat room.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncUnMuteChatRoomMembers(String, List, ValueCallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
membersThe list of members to be unmuted.
Returns
The modified chat room instance.
Exceptions
ChatExceptionA description of the exception. See Error.

◆ updateChatRoomAnnouncement()

void io.agora.chat.ChatRoomManager.updateChatRoomAnnouncement ( String  chatRoomId,
String  announcement 
) throws ChatException

Updates the chat room announcement.

Note
Only the chat room owner or admin can call this method.

For the asynchronous method, see asyncUpdateChatRoomAnnouncement(String, String, CallBack).

This is a synchronous method and blocks the current thread.

Parameters
chatRoomIdThe chat room ID.
announcementThe modified announcement content.
Exceptions
ChatExceptionA description of the exception. See Error.

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