Public Member Functions | |
| void | onInvitationReceived (String groupId, String groupName, String inviter, String reason) |
| void | onRequestToJoinReceived (String groupId, String groupName, String applicant, String reason) |
| void | onRequestToJoinAccepted (String groupId, String groupName, String accepter) |
| default void | onRequestToJoinDeclined (String groupId, String groupName, String decliner, String reason, String applicant) |
| void | onInvitationAccepted (String groupId, String invitee, String reason) |
| void | onInvitationDeclined (String groupId, String invitee, String reason) |
| void | onUserRemoved (String groupId, String groupName) |
| void | onGroupDestroyed (String groupId, String groupName) |
| void | onAutoAcceptInvitationFromGroup (String groupId, String inviter, String inviteMessage) |
| void | onMuteListAdded (String groupId, final List< String > mutes, final long muteExpire) |
| void | onMuteListRemoved (String groupId, final List< String > mutes) |
| void | onWhiteListAdded (final String groupId, final List< String > whitelist) |
| void | onWhiteListRemoved (final String groupId, final List< String > whitelist) |
| void | onAllMemberMuteStateChanged (final String groupId, final boolean isMuted) |
| void | onAdminAdded (String groupId, String administrator) |
| void | onAdminRemoved (String groupId, String administrator) |
| void | onOwnerChanged (String groupId, String newOwner, String oldOwner) |
| default void | onMembersJoined (final String groupId, final List< String > members) |
| default void | onMembersExited (final String groupId, final List< String > members) |
| void | onAnnouncementChanged (String groupId, String announcement) |
| void | onSharedFileAdded (String groupId, EMMucSharedFile sharedFile) |
| void | onSharedFileDeleted (String groupId, String fileId) |
| default void | onSpecificationChanged (EMGroup group) |
| default void | onStateChanged (EMGroup group, boolean isDisabled) |
| default void | onGroupMemberAttributeChanged (String groupId, String userId, Map< String, String > attribute, String from) |
| default void | onUserGroupNamecardUpdated (String groupId, String userId, String groupNamecard) |
The group change listener. Listens for group events such as requesting to join a group, approving or declining a group request, and kicking a user out of a group.
Registers a group change listener:
Unregisters a group change listener:
| void com.hyphenate.EMGroupChangeListener.onAdminAdded | ( | String | groupId, |
| String | administrator ) |
Occurs when a member is set as an admin.
| groupId | The group ID. |
| administrator | The member that is set as an admin. |
| void com.hyphenate.EMGroupChangeListener.onAdminRemoved | ( | String | groupId, |
| String | administrator ) |
Occurs when a member's admin privileges are removed.
| groupId | The group ID. |
| administrator | The member whose admin privileges are removed. |
| void com.hyphenate.EMGroupChangeListener.onAllMemberMuteStateChanged | ( | final String | groupId, |
| final boolean | isMuted ) |
Occurs when all group members are muted or unmuted.
| groupId | The group ID. |
| isMuted | Whether all group members are muted or unmuted. true: all group members are muted; false: all group members are unmuted. |
| void com.hyphenate.EMGroupChangeListener.onAnnouncementChanged | ( | String | groupId, |
| String | announcement ) |
Occurs when the announcement is updated.
| groupId | The group ID. |
| announcement | The updated announcement content. |
| void com.hyphenate.EMGroupChangeListener.onAutoAcceptInvitationFromGroup | ( | String | groupId, |
| String | inviter, | ||
| String | inviteMessage ) |
Occurs when the group invitation is accepted automatically. The SDK will join the group before notifying the app of the acceptance of the group invitation. For settings, see com.hyphenate.chat.EMOptions#setAutoAcceptGroupInvitation(boolean value).
| groupId | The group ID. |
| inviter | The inviter ID. |
| inviteMessage | The invitation message. |
| void com.hyphenate.EMGroupChangeListener.onGroupDestroyed | ( | String | groupId, |
| String | groupName ) |
Occurs when a group is destroyed. The SDK will remove the group from the local database and local cache before notifying the app of the group removal.
| groupId | The group ID. |
| groupName | The group name. |
| default void com.hyphenate.EMGroupChangeListener.onGroupMemberAttributeChanged | ( | String | groupId, |
| String | userId, | ||
| Map< String, String > | attribute, | ||
| String | from ) |
Occurs when a custom attribute(s) of a group member is/are changed.
| groupId | The group ID. |
| userId | The user ID of the group member whose custom attributes are changed. |
| attribute | The modified custom attributes, in key-value format. |
| from | The user ID of the operator. |
| void com.hyphenate.EMGroupChangeListener.onInvitationAccepted | ( | String | groupId, |
| String | invitee, | ||
| String | reason ) |
Occurs when a group invitation is accepted.
| groupId | The group ID. |
| invitee | The invitee ID. |
| reason | The reason for acceptance. |
| void com.hyphenate.EMGroupChangeListener.onInvitationDeclined | ( | String | groupId, |
| String | invitee, | ||
| String | reason ) |
Occurs when a group invitation is declined.
| groupId | The group ID. |
| invitee | The invitee ID. |
| reason | The reason for declining. |
| void com.hyphenate.EMGroupChangeListener.onInvitationReceived | ( | String | groupId, |
| String | groupName, | ||
| String | inviter, | ||
| String | reason ) |
Occurs when the user receives a group invitation.
| groupId | The group ID. |
| groupName | The group name. |
| inviter | The invitee ID. |
| reason | The reason for invitation. |
| default void com.hyphenate.EMGroupChangeListener.onMembersExited | ( | final String | groupId, |
| final List< String > | members ) |
Occurs when members leave the group (either proactively or passively).
| groupId | The group ID. |
| members | The list of users IDs of members that leave the group. |
| default void com.hyphenate.EMGroupChangeListener.onMembersJoined | ( | final String | groupId, |
| final List< String > | members ) |
Occurs when members join a group.
| groupId | The group ID. |
| members | The list of user IDs of the new members. |
| void com.hyphenate.EMGroupChangeListener.onMuteListAdded | ( | String | groupId, |
| final List< String > | mutes, | ||
| final long | muteExpire ) |
Occurs when one or more group members are muted.
| groupId | The group ID. |
| mutes | The member(s) added to the mute list. Map.entry.key is the muted username; Map.entry.value is the mute duration in milliseconds. |
| void com.hyphenate.EMGroupChangeListener.onMuteListRemoved | ( | String | groupId, |
| final List< String > | mutes ) |
Occurs when one or more group members are unmuted. Note: The mute function is different from a blocklist. A user, when muted, still can see group messages, but cannot send messages in the group. However, a user on the blocklist can neither see nor send group messages.
| groupId | The group ID. |
| mutes | The member(s) removed from the mute list. |
| void com.hyphenate.EMGroupChangeListener.onOwnerChanged | ( | String | groupId, |
| String | newOwner, | ||
| String | oldOwner ) |
Occurs when the group ownership is transferred.
| groupId | The group ID. |
| newOwner | The new owner. |
| oldOwner | The previous owner. |
| void com.hyphenate.EMGroupChangeListener.onRequestToJoinAccepted | ( | String | groupId, |
| String | groupName, | ||
| String | accepter ) |
Occurs when a group request is accepted.
| groupId | The group ID. |
| groupName | The group name. |
| accepter | The ID of the user that accepts the group request. |
| default void com.hyphenate.EMGroupChangeListener.onRequestToJoinDeclined | ( | String | groupId, |
| String | groupName, | ||
| String | decliner, | ||
| String | reason, | ||
| String | applicant ) |
Occurs when a group request is declined.
| groupId | The group ID. |
| groupName | The group name. |
| decliner | The ID of the user that declines the group request. |
| reason | The reason for declining. |
| applicant | The userId of applicant |
| void com.hyphenate.EMGroupChangeListener.onRequestToJoinReceived | ( | String | groupId, |
| String | groupName, | ||
| String | applicant, | ||
| String | reason ) |
Occurs when the group owner or administrator receives a group request from a user.
| groupId | The group ID. |
| groupName | The group name. |
| applicant | The ID of the user requesting to join the group. |
| reason | The reason for requesting to join the group. |
| void com.hyphenate.EMGroupChangeListener.onSharedFileAdded | ( | String | groupId, |
| EMMucSharedFile | sharedFile ) |
Occurs when a shared file is added to a group.
| groupId | The group ID. |
| sharedFile | The new shared file. |
| void com.hyphenate.EMGroupChangeListener.onSharedFileDeleted | ( | String | groupId, |
| String | fileId ) |
Occurs when a shared file is removed from a group.
| groupId | The group ID. |
| fileId | The ID of the removed shared file. |
| default void com.hyphenate.EMGroupChangeListener.onSpecificationChanged | ( | EMGroup | group | ) |
Occurs when the group detail information is updated, need to callcom.hyphenate.chat.EMGroupManager#asyncGetGroupFromServer(String, EMValueCallBack) to get the latest group information.
| group | The group. |
| default void com.hyphenate.EMGroupChangeListener.onStateChanged | ( | EMGroup | group, |
| boolean | isDisabled ) |
Occurs when the group is enabled or disabled.
| group | The group. |
| isDisabled | Whether the group is disabled. |
| default void com.hyphenate.EMGroupChangeListener.onUserGroupNamecardUpdated | ( | String | groupId, |
| String | userId, | ||
| String | groupNamecard ) |
Occurs when a member's name card in the group is updated.
| groupId | The group ID. |
| userId | The user ID of the group member whose name card is set or updated. |
| groupNamecard | The new name card of the member in the group. |
| void com.hyphenate.EMGroupChangeListener.onUserRemoved | ( | String | groupId, |
| String | groupName ) |
Occurs when the current user is removed from the group by the group admin.
| groupId | The group ID. |
| groupName | The group name. |
| void com.hyphenate.EMGroupChangeListener.onWhiteListAdded | ( | final String | groupId, |
| final List< String > | whitelist ) |
Occurs when one or more group members are added to the allowlist.
| groupId | The group ID. |
| whitelist | The member(s) added to the allowlist. |
| void com.hyphenate.EMGroupChangeListener.onWhiteListRemoved | ( | final String | groupId, |
| final List< String > | whitelist ) |
Occurs when one or more members are removed from the allowlist.
| groupId | The group ID. |
| whitelist | Member(s) removed from the allowlist. |