-
- All Implemented Interfaces:
-
com.netease.yunxin.kit.roomkit.api.NEBaseController
public interface NERoomChatController implements NEBaseController
聊天控制器
-
-
Method Summary
-
-
Method Detail
-
joinChatroom
abstract Unit joinChatroom(NECallback<Unit> callback)
加入聊天室
- Parameters:
callback
- 回调
-
joinChatroom
abstract Unit joinChatroom(NEChatroomType chatroomType, NECallback<Unit> callback)
加入聊天室,填写对应的消息类型
- Parameters:
chatroomType
- 聊天室类型 NEChatroomTypecallback
- 回调
-
leaveChatroom
abstract Unit leaveChatroom(NECallback<Unit> callback)
离开聊天室
-
leaveChatroom
abstract Unit leaveChatroom(NEChatroomType chatroomType, NECallback<Unit> callback)
离开聊天室
- Parameters:
chatroomType
- 聊天室类型 NEChatroomTypecallback
- 回调
-
sendBroadcastTextMessage
abstract Unit sendBroadcastTextMessage(String message, NECallback<NERoomChatMessage> callback)
发送广播消息
- Parameters:
message
- 文本消息callback
- 回调
-
sendBroadcastTextMessage
abstract Unit sendBroadcastTextMessage(String message, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
发送广播消息
- Parameters:
message
- 文本消息chatroomType
- 聊天室类型callback
- 回调
-
sendDirectTextMessage
abstract Unit sendDirectTextMessage(String userUuid, String message, NECallback<NERoomChatMessage> callback)
发送定向消息
- Parameters:
userUuid
- 对方用户idmessage
- 文本消息callback
- 回调
-
sendDirectTextMessage
abstract Unit sendDirectTextMessage(String userUuid, String message, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
发送定向消息
- Parameters:
userUuid
- 对方用户idmessage
- 文本消息chatroomType
- 聊天室类型callback
- 回调
-
sendGroupTextMessage
abstract Unit sendGroupTextMessage(List<String> userUuids, String message, NECallback<NERoomChatMessage> callback)
给多人发送消息
- Parameters:
userUuids
- 用户id列表message
- 文本消息callback
- 回调
-
sendGroupTextMessage
abstract Unit sendGroupTextMessage(List<String> userUuids, String message, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
给多人发送消息
- Parameters:
userUuids
- 用户id列表message
- 文本消息chatroomType
- 聊天室类型callback
- 回调
-
sendImageMessage
abstract Unit sendImageMessage(String messageUuid, String imagePath, List<String> userUuids, NECallback<NERoomChatMessage> callback)
发送图片消息
- Parameters:
messageUuid
- 消息标识,可用于监听附件上传的进度,可通过 UUID.imagePath
- 图片路径userUuids
- 用户id列表,为空表示全员消息callback
- 回调
-
sendImageMessage
abstract Unit sendImageMessage(String messageUuid, String imagePath, List<String> userUuids, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
发送图片消息
- Parameters:
messageUuid
- 消息标识,可用于监听附件上传的进度,可通过 UUID.imagePath
- 图片路径userUuids
- 用户id列表,为空表示全员消息chatroomType
- 聊天室类型callback
- 回调
-
sendFileMessage
abstract Unit sendFileMessage(String messageUuid, String filePath, List<String> userUuids, NECallback<NERoomChatMessage> callback)
发送文件消息
- Parameters:
messageUuid
- 消息标识,可用于监听附件上传的进度,可通过 UUID.filePath
- 文件路径userUuids
- 用户id列表,为空表示全员消息callback
- 回调
-
sendFileMessage
abstract Unit sendFileMessage(String messageUuid, String filePath, List<String> userUuids, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
发送文件消息
- Parameters:
messageUuid
- 消息标识,可用于监听附件上传的进度,可通过 UUID.filePath
- 文件路径userUuids
- 用户id列表,为空表示全员消息chatroomType
- 聊天室类型callback
- 回调
-
downloadAttachment
abstract Unit downloadAttachment(String messageUuid, NECallback<Unit> callback)
下载文件消息附件。
- Parameters:
messageUuid
- 消息唯一ID。callback
- 回调
-
cancelDownloadAttachment
abstract Unit cancelDownloadAttachment(String messageUuid, NECallback<Unit> callback)
取消下载文件消息附件。
- Parameters:
messageUuid
- 消息唯一ID。callback
- 回调
-
fetchChatroomMembers
abstract Unit fetchChatroomMembers(NEChatroomMemberQueryType type, Integer limit, NECallback<List<NEChatroomMember>> callback)
获取聊天室成员信息
- Parameters:
type
- 成员查询类型limit
- 人数限制callback
- 回调
-
fetchChatroomMembers
abstract Unit fetchChatroomMembers(NEChatroomMemberQueryType type, Integer limit, NEChatroomType roomType, NECallback<List<NEChatroomMember>> callback)
获取聊天室成员信息
- Parameters:
type
- 成员查询类型limit
- 人数限制roomType
- 聊天室类型callback
- 回调
-
fetchChatroomMembers
abstract Unit fetchChatroomMembers(NEChatroomMemberQueryType type, Integer limit, NEChatroomType roomType, String lastMember, NECallback<List<NEChatroomMember>> callback)
获取聊天室成员信息
- Parameters:
type
- 成员查询类型limit
- 人数限制sroomType
- 聊天室类型lastMember
- 最后一位成员锚点,不包括此成员。填null会使用当前服务器最新时间开始查询,即第一页。callback
- 回调
-
banMemberChat
abstract Unit banMemberChat(String userUuid, Long duration, String notifyExt, NECallback<Unit> callback)
设置成员聊天禁言
- Parameters:
userUuid
- 成员idduration
- 禁言时长,单位秒notifyExt
- 扩展信息callback
- 回调 <br>相关回调:禁言聊天成功后,会立即触发NERoomListener.onMemberChatBanStateChanged回调
-
unbanMemberChat
abstract Unit unbanMemberChat(String userUuid, String notifyExt, NECallback<Unit> callback)
取消成员聊天禁言
- Parameters:
userUuid
- 成员idnotifyExt
- 扩展信息callback
- 回调 <br>相关回调:禁言聊天成功后,会立即触发NERoomListener.onMemberChatBanStateChanged回调
-
getChatBannedMembers
abstract Unit getChatBannedMembers(NECallback<List<NERoomMember>> callback)
获取聊天室禁言用户列表
- Parameters:
callback
- 回调
-
fetchChatroomHistoryMessages
abstract Unit fetchChatroomHistoryMessages(NERoomHistoryMessageSearchOption options, NECallback<List<NERoomChatMessage>> callback)
获取聊天室历史消息
- Parameters:
options
- 历史消息查询选项callback
- 回调
-
recallChatroomMessage
@Deprecated(message = "use recallChatroomMessage") abstract Unit recallChatroomMessage(String messageUuid, Long messageTime, NECallback<Unit> callback)
撤回聊天室消息
- Parameters:
messageUuid
- 被撤回的消息ID,从发送消息的返回结果中NERoomChatMessage.messageUuid获取messageTime
- 被撤回消息的时间戳,,从发送消息的返回结果中NERoomChatMessage.time获取callback
- 回调
-
recallChatroomMessage
abstract Unit recallChatroomMessage(String messageUuid, Long messageTime, NEChatroomType chatroomType, NECallback<Unit> callback)
撤回聊天室消息
- Parameters:
messageUuid
- 被撤回的消息ID,从发送消息的返回结果中NERoomChatMessage.messageUuid获取messageTime
- 被撤回消息的时间戳,,从发送消息的返回结果中NERoomChatMessage.time获取chatroomType
- 聊天室类型callback
- 回调
-
sendBroadcastCustomMessage
abstract Unit sendBroadcastCustomMessage(String message, NECallback<NERoomChatMessage> callback)
发送自定义广播消息
- Parameters:
message
- 消息内容callback
- 回调
-
sendBroadcastCustomMessage
abstract Unit sendBroadcastCustomMessage(String message, NEChatroomType chatroomType, NECallback<NERoomChatMessage> callback)
发送自定义广播消息
- Parameters:
message
- 消息内容chatroomType
- 聊天室类型callback
- 回调
-
getIsSupported
abstract Boolean getIsSupported()
功能是否支持
-
-
-
-