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

Inherits io.agora.chat.EMBase< T >.

Classes

enum  ChatRoomPermissionType
 
enum  ChatRoomStyle
 

Public Member Functions

 ChatRoom (EMAChatRoom room)
 
 ChatRoom (String roomId)
 
 ChatRoom (String roomId, String roomName)
 
String getId ()
 
String getName ()
 
String getDescription ()
 
String getOwner ()
 
List< String > getAdminList ()
 
int getMemberCount ()
 
int getMaxUsers ()
 
List< String > getMemberList ()
 
List< String > getBlackList ()
 
Map< String, Long > getMuteList ()
 
List< String > getWhiteList ()
 
boolean isAllMemberMuted ()
 
String getAnnouncement ()
 
ChatRoomPermissionType getChatRoomPermissionType ()
 

Detailed Description

Chatroom object

Member Function Documentation

List<String> io.agora.chat.ChatRoom.getAdminList ( )

Get chat room administrator list If not fetch the chat room's detail specification, the result may be empty Get chat room detail, see ChatRoomManager#fetchChatRoomFromServer(String)

Returns
List of administrator IDs
String io.agora.chat.ChatRoom.getAnnouncement ( )

Get chatroom announcement If not get announcement from server, the return may be empty Get chat room announcement, can call the method of ChatRoomManager#fetchChatRoomAnnouncement(String), also can call its asynchronous method of ChatRoomManager#asyncFetchChatRoomAnnouncement(String, ValueCallBack)

Returns
announcement
List<String> io.agora.chat.ChatRoom.getBlackList ( )

Return black list If not get blacklist from server, the return may be empty Fetch blacklist can call ChatRoomManager#fetchChatRoomBlackList(String, int, int), call this method need owner or admin authority, also can call it's asynchronous method ChatRoomManager#asyncFetchChatRoomBlackList(String, int, int, ValueCallBack)

Returns
Return the blacklist
ChatRoomPermissionType io.agora.chat.ChatRoom.getChatRoomPermissionType ( )

Get the current user's role in chat room

Returns
ChatRoomPermissionType
String io.agora.chat.ChatRoom.getDescription ( )

Get chat room description

Returns
Chat room description
String io.agora.chat.ChatRoom.getId ( )

Get chat room id

Returns
Chat room id
int io.agora.chat.ChatRoom.getMaxUsers ( )

Max chat room members capability It depends on chat room detail, if not fetch chat room detail, return 0

Returns
The maximum number of members in chat room
int io.agora.chat.ChatRoom.getMemberCount ( )

Return the number of online members

List<String> io.agora.chat.ChatRoom.getMemberList ( )

Return member list If not get members from server, the return may be empty You can get members in the flowing ways: (1) When member's number is less than 200, can use ChatRoomManager#fetchChatRoomFromServer(String, boolean) to fetch, the second parameter pass in true, can get up to 200 members (2) Use the method of ChatRoomManager#fetchChatRoomMembers(String, String, int) to get by page, also can use its asynchronous method of ChatRoomManager#asyncFetchChatRoomMembers(String, String, int, ValueCallBack) to get

Returns
The list of member IDs
Map<String, Long> io.agora.chat.ChatRoom.getMuteList ( )

Return mute list If not get mute list from server, the return may be empty Fetch mute list can call ChatRoomManager#fetchChatRoomMuteList(String, int, int), call this method need owner or admin authority, also can call it's asynchronous method ChatRoomManager#asyncFetchChatRoomMuteList(String, int, int, ValueCallBack)

Returns
Return the mute list, Map.entry.key is username of mute action, Map.entry.value is expired time of banning post action, in milli-seconds
String io.agora.chat.ChatRoom.getName ( )

Get chat room name

Returns
Chat room name
String io.agora.chat.ChatRoom.getOwner ( )

Get chat room owner If not fetch the chat room's detail specification, the return may be empty Get chat room detail, see ChatRoomManager#fetchChatRoomFromServer(String)

Returns
List<String> io.agora.chat.ChatRoom.getWhiteList ( )

Return white list If not get whitelist from server, the return may be empty Fetch whitelist can call ChatRoomManager#fetchChatRoomMuteList(String, int, int), call this method need owner or admin authority

Returns
whitelist
boolean io.agora.chat.ChatRoom.isAllMemberMuted ( )

Return if all member muted This method has limitations and is recommended to be used with caution You need to be careful when you use this method: (1) After joining the chat room, the status will be updated after receiving the all-mute/all-unmute callback, and the status obtained using this method is correct (2) After exiting from the chat room and reentering the chat room, the status obtained from this method is not trusted

Returns
boolean

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