Chat SDK for Android v1.3.2
agora java chat SDK
 
Loading...
Searching...
No Matches
io.agora.chat.ChatRoom Class Reference

Classes

enum  ChatRoomPermissionType
 

Public Member Functions

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 ()
 
long getCreateTimestamp ()
 
boolean isInWhitelist ()
 
long getMuteExpireTimestamp ()
 

Detailed Description

Chat room types.

Member Function Documentation

◆ getAdminList()

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

Gets the chat room admin list. For how to get chat room, see ChatRoomManager#fetchChatRoomFromServer(String).

Returns
The chat room admin ID list. If this method returns an empty list, the SDK fails to get the admin list of the chat room.

◆ getAnnouncement()

String io.agora.chat.ChatRoom.getAnnouncement ( )

Gets the chat room announcement.

To get the chat room announcement, you can call ChatRoomManager#fetchChatRoomAnnouncement(String)

or its asynchronous method ChatRoomManager#asyncFetchChatRoomAnnouncement(String, ValueCallBack).

Returns
The chat room announcement. If this method returns an empty string, the SDK fails to get the chat room announcement.

◆ getBlacklist()

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

Returns the chat room blocklist. To get the blocklist, you can call ChatRoomManager#fetchChatRoomBlackList(String, int, int). You can call this method as the chat room owner or admin or call its asynchronous method. ChatRoomManager#asyncFetchChatRoomBlackList(String, int, int, ValueCallBack).

Returns
The chat room blocklist. If this method returns an empty list, the SDK fails to get the blocklist.

◆ getChatRoomPermissionType()

ChatRoomPermissionType io.agora.chat.ChatRoom.getChatRoomPermissionType ( )

Gets the current user's role in the chat room.

Returns
The current user's role in the chat room, see ChatRoomPermissionType.

◆ getCreateTimestamp()

long io.agora.chat.ChatRoom.getCreateTimestamp ( )

Gets the timestamp when the chat room was created. This property is available once join the chat room.

Returns
The timestamp when the chat room was created.

◆ getDescription()

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

Gets the chat room description.

Returns
The chat room description.

◆ getId()

String io.agora.chat.ChatRoom.getId ( )

Gets the chat room ID.

Returns
The chat room ID.

◆ getMaxUsers()

int io.agora.chat.ChatRoom.getMaxUsers ( )

Gets the maximum number of members in the chat room which is determined during chat room creation. This method can return a correct value only after you call ChatRoomManager.fetchChatRoomFromServer(String) to get chat room details.

Returns
The maximum number of members in a chat room. Returns 0 if the SDK fails to get the maximum number.

◆ getMemberCount()

int io.agora.chat.ChatRoom.getMemberCount ( )

Returns the number of online members.

This includes the chat room owner, administrators, and regular members. You can get this information after joining the chat room. This property is updated when members join or leave the chat room.

Returns
The number of online members.

◆ getMemberList()

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

Returns the member list. You can get the member list in the following ways:

Returns
The member ID list. If this method returns an empty list, the SDK fails to get the member list.

◆ getMuteExpireTimestamp()

long io.agora.chat.ChatRoom.getMuteExpireTimestamp ( )

Gets the timestamp(ms) when Current user will be unmuted.

This property is available once join the chat room. This property will be updated when current use is muted or unmuted.

Returns
The timestamp(ms) when Current user will be unmuted.
  • Current use is not muted if it is zero.
  • Means cannot get MuteUntilTimeStamp correctly if it is be set with -1;

◆ getMuteList()

Map< String, Long > io.agora.chat.ChatRoom.getMuteList ( )

Returns the mute list of the chat room. To get the mute list, you can call ChatRoomManager#fetchChatRoomMuteList(String, int, int). You can call this method as the chat room owner or admin or call its asynchronous method ChatRoomManager#asyncFetchChatRoomMuteList(String, int, int, ValueCallBack).

Returns
The mute list, where Map.entry.key is the ID of the muted member and Map.entry.value is the mute duration in milliseconds. If this method returns an empty map, the SDK fails to get the mute list.

◆ getName()

String io.agora.chat.ChatRoom.getName ( )

Gets the chat room name.

Returns
The chat room name.

◆ getOwner()

String io.agora.chat.ChatRoom.getOwner ( )

Gets the chat room owner. For how to get chat room details, see ChatRoomManager#fetchChatRoomFromServer(String).

Returns
The chat room owner ID. If this method returns an empty string, the SDK fails to get chat room details.

◆ getWhitelist()

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

Returns the chat room allowlist.

To get the allowlist, you can call ChatRoomManager#fetchChatRoomWhiteList(String, ValueCallBack).

You can call this method as the chat room owner or admin.

Returns
The allowlist. If this method returns an empty list, the SDK fails to get the allowlist.

◆ isAllMemberMuted()

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

Checks whether all members are muted,This propery is available once join the chat room.

After joining the chat room, when you receive a callback for muting or unmuting all members, this property will be updated.

Returns
Whether all members are muted.
  • true: All members are muted.
  • false: Not all members are muted.

◆ isInWhitelist()

boolean io.agora.chat.ChatRoom.isInWhitelist ( )

Current user is in white list or not. This property is available once join the chat room. This property will be updated when current user is added or removed from the white list.

Returns
Whether current user is in white list.
  • true: In white list.
  • false: Not in white list.

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