public class EventNotificationContent extends MessageContent
1.EventNotificationContent.EventNotificationType.group_member_keep_silence设置禁言事件
2.EventNotificationContent.EventNotificationType.group_member_keep_silence_cancel取消禁言事件
当收到群成员禁言通知事件时,sdk会根据具体状态设置事件类型,上抛事件
2.5.0增加四种种事件类型:
1.EventNotificationContent.EventNotificationType.group_keeper_added添加管理员事件
2.EventNotificationContent.EventNotificationType.group_keeper_removed取消管理员事件
3.EventNotificationContent.EventNotificationType.group_dissolved群解散事件, 群解散事件的userNames为null
4.EventNotificationContent.EventNotificationType.group_owner_changed群主变更事件
2.6.1增加:
1.EventNotificationContent.EventNotificationType.group_type_changed群组类型改变
2.EventNotificationContent.EventNotificationType.group_max_member_count_changed群组成员上限修改
| 限定符和类型 | 类和说明 |
|---|---|
static class |
EventNotificationContent.EventNotificationType |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancelDownload(Message message)
取消下载,手动下载后可调用此接口取消下载, 注意可以自动下载的文件不可取消
是否取消成功需要根据下载的回调来判断,如果取消成功,下载回调中错误码为 ErrorCode.LOCAL_ERROR#LOCAL_OPERATION_CANCELLED |
boolean |
containsGroupOwner()
已过时。
deprecated in sdk version 1.1.5
|
java.lang.String |
getCustom()
获取自定义信息
|
EventNotificationContent.EventNotificationType |
getEventNotificationType()
获取通知事件的类型
|
java.lang.String |
getEventText()
获取通知事件相应的文字描述
|
UserInfo |
getOperatorUserInfo()
获取事件发起者的UserInfo
|
java.util.List<java.lang.String> |
getOtherMemberDisplayNames()
获取通知事件发生时群组内其他群成员(除开事件发起者和用户自身以外)的展示名DisplayName(说明见
GroupMemberInfo.getDisplayName())列表 |
java.util.List<java.lang.String> |
getUserDisplayNames()
获取通知事件涉及到的用户的展示名DisplayName(说明见
GroupMemberInfo.getDisplayName())列表 |
java.util.List<java.lang.String> |
getUserNames()
获取通知事件涉及到的用户的username列表。
|
boolean |
needAutoDownloadWhenRecv() |
clone, fromJson, getBooleanExtra, getBooleanExtras, getContentType, getNumberExtra, getNumberExtras, getStringExtra, getStringExtras, setBooleanExtra, setExtras, setNumberExtra, setStringExtra, toJson, toJsonElementpublic boolean needAutoDownloadWhenRecv()
needAutoDownloadWhenRecv 在类中 MessageContentpublic void cancelDownload(Message message)
MessageContentErrorCode.LOCAL_ERROR#LOCAL_OPERATION_CANCELLEDcancelDownload 在类中 MessageContentmessage - 该Content所对应的消息对象public EventNotificationContent.EventNotificationType getEventNotificationType()
public java.util.List<java.lang.String> getUserNames()
public java.util.List<java.lang.String> getUserDisplayNames()
GroupMemberInfo.getDisplayName())列表public java.util.List<java.lang.String> getOtherMemberDisplayNames()
GroupMemberInfo.getDisplayName())列表public UserInfo getOperatorUserInfo()
@Deprecated public boolean containsGroupOwner()
public java.lang.String getEventText()
public java.lang.String getCustom()