Chat SDK for Android v1.2.1
agora java chat SDK
|
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) |
void | onRequestToJoinDeclined (String groupId, String groupName, String decliner, String reason) |
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) |
void | onMemberJoined (final String groupId, final String member) |
void | onMemberExited (final String groupId, final String member) |
void | onAnnouncementChanged (String groupId, String announcement) |
void | onSharedFileAdded (String groupId, MucSharedFile sharedFile) |
void | onSharedFileDeleted (String groupId, String fileId) |
default void | onSpecificationChanged (Group group) |
default void | onStateChanged (Group group, boolean isDisabled) |
default void | onGroupMemberAttributeChanged (String groupId, String userId, Map< String, String > attribute, String from) |
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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.onAnnouncementChanged | ( | String | groupId, |
String | announcement | ||
) |
Occurs when the announcement is updated.
groupId | The group ID. |
announcement | The updated announcement content. |
void io.agora.GroupChangeListener.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 io.agora.chat.ChatOptions#setAutoAcceptGroupInvitation(boolean value).
groupId | The group ID. |
inviter | The inviter ID. |
inviteMessage | The invitation message. |
void io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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. |
void io.agora.GroupChangeListener.onMemberExited | ( | final String | groupId, |
final String | member | ||
) |
Occurs when a member proactively leaves the group.
groupId | The group ID. |
member | The member leaving the group. |
void io.agora.GroupChangeListener.onMemberJoined | ( | final String | groupId, |
final String | member | ||
) |
Occurs when a member joins a group.
groupId | The group ID. |
member | The ID of the new member. |
void io.agora.GroupChangeListener.onMuteListAdded | ( | String | groupId, |
final List< String > | mutes, | ||
final long | muteExpire | ||
) |
Occurs when one or more group members are muted. Note: The mute function is different from a blocklist. A user, when muted, can still 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) added to the mute list. Map.entry.key is the muted username; Map.entry.value is the mute duration in milliseconds. |
void io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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. |
void io.agora.GroupChangeListener.onRequestToJoinDeclined | ( | String | groupId, |
String | groupName, | ||
String | decliner, | ||
String | reason | ||
) |
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. |
void io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.onSharedFileAdded | ( | String | groupId, |
MucSharedFile | sharedFile | ||
) |
Occurs when a shared file is added to a group.
groupId | The group ID. |
sharedFile | The new shared file. |
void io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.onSpecificationChanged | ( | Group | group | ) |
Occurs when the group detail information is updated,need to callio.agora.chat.GroupManager#asyncGetGroupFromServer(String, ValueCallBack) to get the latest group information.
group | The group. |
default void io.agora.GroupChangeListener.onStateChanged | ( | Group | group, |
boolean | isDisabled | ||
) |
Occurs when the group is enabled or disabled.
group | The group. |
isDisabled | Whether the group is disabled. |
void io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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 io.agora.GroupChangeListener.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. |