hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
Classes | Public Member Functions | List of all members
com.hyphenate.chat.EMChatRoom Class Reference

Inherits com.hyphenate.chat.EMBase< T >.

Classes

enum  EMChatRoomPermissionType
 
enum  EMChatRoomStyle
 

Public Member Functions

 EMChatRoom (EMAChatRoom room)
 
 EMChatRoom (String roomId)
 
 EMChatRoom (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 ()
 
EMChatRoomPermissionType getChatRoomPermissionType ()
 

Detailed Description

Chatroom object

Member Function Documentation

List<String> com.hyphenate.chat.EMChatRoom.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 EMChatRoomManager#fetchChatRoomFromServer(String)

Returns
List of administrator IDs
String com.hyphenate.chat.EMChatRoom.getAnnouncement ( )

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

Returns
announcement
List<String> com.hyphenate.chat.EMChatRoom.getBlackList ( )

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

Returns
Return the blacklist
EMChatRoomPermissionType com.hyphenate.chat.EMChatRoom.getChatRoomPermissionType ( )

Get the current user's role in chat room

Returns
EMChatRoomPermissionType
String com.hyphenate.chat.EMChatRoom.getDescription ( )

Get chat room description

Returns
Chat room description
String com.hyphenate.chat.EMChatRoom.getId ( )

Get chat room id

Returns
Chat room id
int com.hyphenate.chat.EMChatRoom.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 com.hyphenate.chat.EMChatRoom.getMemberCount ( )

Return the number of online members

List<String> com.hyphenate.chat.EMChatRoom.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 EMChatRoomManager#fetchChatRoomFromServer(String, boolean) to fetch, the second parameter pass in true, can get up to 200 members (2) Use the method of EMChatRoomManager#fetchChatRoomMembers(String, String, int) to get by page, also can use its asynchronous method of EMChatRoomManager#asyncFetchChatRoomMembers(String, String, int, EMValueCallBack) to get

Returns
The list of member IDs
Map<String, Long> com.hyphenate.chat.EMChatRoom.getMuteList ( )

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

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 com.hyphenate.chat.EMChatRoom.getName ( )

Get chat room name

Returns
Chat room name
String com.hyphenate.chat.EMChatRoom.getOwner ( )

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

Returns
List<String> com.hyphenate.chat.EMChatRoom.getWhiteList ( )

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

Returns
whitelist
boolean com.hyphenate.chat.EMChatRoom.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: