Public Member Functions | |
| void | onChatRoomDestroyed (final String roomId, final String roomName) |
| default void | onMemberJoined (final String roomId, final String participant) |
| default void | onMemberJoined (final String roomId, final String participant, String ext) |
| void | onMemberExited (final String roomId, final String roomName, final String participant) |
| void | onRemovedFromChatRoom (final int reason, final String roomId, final String roomName, final String participant) |
| void | onMuteListAdded (final String chatRoomId, final List< String > mutes, final long expireTime) |
| default void | onMuteListAdded (final String chatRoomId, Map< String, Long > muteInfo) |
| void | onMuteListRemoved (final String chatRoomId, final List< String > mutes) |
| void | onWhiteListAdded (final String chatRoomId, final List< String > whitelist) |
| void | onWhiteListRemoved (final String chatRoomId, final List< String > whitelist) |
| void | onAllMemberMuteStateChanged (final String chatRoomId, final boolean isMuted) |
| void | onAdminAdded (final String chatRoomId, final String admin) |
| void | onAdminRemoved (final String chatRoomId, final String admin) |
| void | onOwnerChanged (final String chatRoomId, final String newOwner, final String oldOwner) |
| void | onAnnouncementChanged (String chatRoomId, String announcement) |
| default void | onSpecificationChanged (ChatRoom chatRoom) |
| default void | onAttributesUpdate (String chatRoomId, Map< String, String > attributeMap, String from) |
| default void | onAttributesRemoved (String chatRoomId, List< String > keyList, String from) |
Public Attributes | |
| int | BE_KICKED = 0 |
| int | BE_KICKED_FOR_OFFLINE = 2 |
The chat room change listener.
You can add or remove a chat room change listener by using io.agora.chat.ChatRoomManager.
Add a chat room change listener:
Remove a chat room change listener:
| void io.agora.ChatRoomChangeListener.onAdminAdded | ( | final String | chatRoomId, |
| final String | admin ) |
Occurs when a chat room member is set as an admin.
The member set as the chat room admin receives this event.
| chatRoomId | The chat room ID. |
| admin | The chat room member set as an admin. |
| void io.agora.ChatRoomChangeListener.onAdminRemoved | ( | final String | chatRoomId, |
| final String | admin ) |
Occurs when the chat room member(s) is/are removed from the admin list.
The admin removed from the admin list receives this event.
| chatRoomId | The chat room ID. |
| admin | The member(s) removed from the admin list. |
| void io.agora.ChatRoomChangeListener.onAllMemberMuteStateChanged | ( | final String | chatRoomId, |
| final boolean | isMuted ) |
Occurs when all members in the chat room are muted or unmuted.
All chat room members receive this event.
| chatRoomId | The chat room ID. |
| isMuted | Whether all chat room members are muted or unmuted. |
| void io.agora.ChatRoomChangeListener.onAnnouncementChanged | ( | String | chatRoomId, |
| String | announcement ) |
Occurs when the chat room announcement changes.
All chat room members receive this event.
| chatRoomId | The chat room ID. |
| announcement | The modified chat room announcement. |
| default void io.agora.ChatRoomChangeListener.onAttributesRemoved | ( | String | chatRoomId, |
| List< String > | keyList, | ||
| String | from ) |
The custom chat room attribute(s) is/are removed.
All chat room members receive this event.
| chatRoomId | The chat room ID. |
| keyList | The list of custom chat room attributes key. |
| from | The user ID of the operator. |
| default void io.agora.ChatRoomChangeListener.onAttributesUpdate | ( | String | chatRoomId, |
| Map< String, String > | attributeMap, | ||
| String | from ) |
The custom chat room attribute(s) is/are updated.
All chat room members receive this event.
| chatRoomId | The chat room ID. |
| attributeMap | The map of custom chat room attributes. |
| from | The user ID of the operator. |
| void io.agora.ChatRoomChangeListener.onChatRoomDestroyed | ( | final String | roomId, |
| final String | roomName ) |
Occurs when the chat room is destroyed.
All chat room members receive this event.
| roomId | The chat room ID. |
| roomName | The chat room name. |
| void io.agora.ChatRoomChangeListener.onMemberExited | ( | final String | roomId, |
| final String | roomName, | ||
| final String | participant ) |
Occurs when a member exits the chat room.
All chat room members, except the member exiting the chat room, receive this event.
| roomId | The chat room ID. |
| roomName | The chat room name. |
| participant | The member exiting the chat room. |
| default void io.agora.ChatRoomChangeListener.onMemberJoined | ( | final String | roomId, |
| final String | participant ) |
Occurs when a member joins the chat room.
All chat room members, except the new member, receive this event.
| roomId | The chat room ID. |
| participant | The new member. |
onMemberJoined(java.lang.String, java.lang.String, java.lang.String) instead. | default void io.agora.ChatRoomChangeListener.onMemberJoined | ( | final String | roomId, |
| final String | participant, | ||
| String | ext ) |
Occurs when a member joins the chat room.
All chat room members, except the new member, receive this event.
| roomId | The chat room ID. |
| participant | The new member. |
| ext | The extension information. |
| void io.agora.ChatRoomChangeListener.onMuteListAdded | ( | final String | chatRoomId, |
| final List< String > | mutes, | ||
| final long | expireTime ) |
Occurs when the chat room member(s) is/are added to the mute list.
The muted members receive this event. The muted members cannot send message during the mute duration.
| chatRoomId | The chat room ID. |
| mutes | The muted number(s). |
| expireTime | The Unix timestamp when the mute expires. The unit is millisecond. Reserved parameter. |
onMuteListAdded(String, Map) instead. | default void io.agora.ChatRoomChangeListener.onMuteListAdded | ( | final String | chatRoomId, |
| Map< String, Long > | muteInfo ) |
Occurs when the chat room member(s) is/are added to the mute list.
The muted members receive this event. The muted members cannot send message during the mute duration.
| chatRoomId | The chat room ID. |
| muteInfo | The mute info, map structure key: The member's userId that is muted. value: The Unix timestamp when the mute expires. The unit is millisecond. |
| void io.agora.ChatRoomChangeListener.onMuteListRemoved | ( | final String | chatRoomId, |
| final List< String > | mutes ) |
Occurs when the chat room member(s) is/are removed from the mute list.
The members that are removed from the mute list receive this event.
| chatRoomId | The chat room ID. |
| mutes | The member(s) removed from the mute list. |
| void io.agora.ChatRoomChangeListener.onOwnerChanged | ( | final String | chatRoomId, |
| final String | newOwner, | ||
| final String | oldOwner ) |
Occurs when the chat room owner is changed.
The chat room owner receives this event.
| chatRoomId | The chat room ID. |
| newOwner | The new chat room owner. |
| oldOwner | The previous chat room owner. |
| void io.agora.ChatRoomChangeListener.onRemovedFromChatRoom | ( | final int | reason, |
| final String | roomId, | ||
| final String | roomName, | ||
| final String | participant ) |
Occurs when a member is removed from a chat room.
The member that is kicked out of the chat room receive this event.
| reason | The reason why the member is removed from the chat room:
|
| roomId | The chat room ID. |
| roomName | The chat room name. |
| participant | The member removed from a chat room. |
| default void io.agora.ChatRoomChangeListener.onSpecificationChanged | ( | ChatRoom | chatRoom | ) |
Occurs when the chat room specifications changes.
All chat room members receive this event.
| chatRoom | The chat room instance. |
| void io.agora.ChatRoomChangeListener.onWhiteListAdded | ( | final String | chatRoomId, |
| final List< String > | whitelist ) |
Occurs when the chat room member(s) is/are added to the allow list.
The members added to the allow list receive this event.
| chatRoomId | The chat room ID. |
| whitelist | The member(s) added to the allow list. |
| void io.agora.ChatRoomChangeListener.onWhiteListRemoved | ( | final String | chatRoomId, |
| final List< String > | whitelist ) |
Occurs when the chat room member(s) is/are removed from the allow list.
The members that are removed from the allow list receive this event.
| chatRoomId | The chat room ID. |
| whitelist | The member(s) removed from the allow list. |
| int io.agora.ChatRoomChangeListener.BE_KICKED = 0 |
User is kicked out by chat room owner.
| int io.agora.ChatRoomChangeListener.BE_KICKED_FOR_OFFLINE = 2 |
User is kicked out by server for user offline for a while(2 minutes by default).