Methods
-
addCollect({required int type, required String data, String? ext, String? uniqueId})
→ Future<NIMResult<NIMCollectInfo>>
-
添加一条收藏
-
addMessagePin(NIMMessage message, String? ext)
→ Future<NIMResult<void>>
-
PIN一条消息
-
增加一条快捷评论
-
addStickTopSession(String sessionId, NIMSessionType sessionType, String ext)
→ Future<NIMResult<NIMStickTopSessionInfo>>
-
添加一个置顶会话
-
cancelUploadAttachment(NIMMessage message)
→ Future<NIMResult<void>>
-
-
checkLocalAntiSpam(String content, String replacement)
→ Future<NIMResult<NIMLocalAntiSpamResult>>
-
检验本地反垃圾词库,支持单聊、群聊和聊天室的文本消息反垃圾
-
clearAllSessionUnreadCount()
→ Future<NIMResult<void>>
-
清空所有会话的未读计数
-
clearChattingHistory(String account, NIMSessionType sessionType, bool? ignore)
→ Future<void>
-
-
clearMsgDatabase(bool clearRecent)
→ Future<void>
-
-
clearServerHistory(String sessionId, NIMSessionType sessionType, bool sync)
→ Future<void>
-
-
clearSessionUnreadCount(List<NIMSessionInfo> sessionInfoList)
→ Future<NIMResult<List<NIMSessionInfo>>>
-
清除未读数
-
convertJsonToMessage(String json)
→ Future<NIMResult<NIMMessage>>
-
-
convertMessageToJson(NIMMessage message)
→ Future<NIMResult<String>>
-
-
createMessage({required NIMMessage message})
→ Future<NIMResult<NIMMessage>>
-
-
createSession({required String sessionId, required NIMSessionType sessionType, int tag = 0, required int time, bool linkToLastMessage = false})
→ Future<NIMResult<NIMSession>>
-
创建一条空的联系人会话,并保存到数据库中
sessionId
- 会话id ,对方帐号或群组id。
sessionType
- 会话类型
tag
- 会话tag , eg:置顶标签(UIKit中的实现: RECENT_TAG_STICKY) ,用户参照自己的tag 实现即可, 如不需要,传 0 即可
time
- 会话时间 ,单位为ms。
linkToLastMessage
- 是否放入最后一条消息的相关信息
-
deleteChattingHistory(NIMMessage anchor, bool ignore)
→ Future<void>
-
-
deleteChattingHistoryList(List<NIMMessage> msgList, bool ignore)
→ Future<void>
-
-
deleteMsgListSelf(List<NIMMessage> msgList, String ext)
→ Future<NIMResult<int>>
-
-
deleteMsgSelf(NIMMessage msg, String ext)
→ Future<NIMResult<int>>
-
-
deleteMySession(List<NIMMySessionKey> sessionList)
→ Future<NIMResult<void>>
-
【会话服务】删除会话
-
deleteSession({required NIMSessionInfo sessionInfo, required NIMSessionDeleteType deleteType, required bool sendAck})
→ Future<NIMResult<void>>
-
删除最近联系人记录。
调用该接口后,会触发{@link MsgServiceObserve#observeRecentContactDeleted(Observer, boolean)}通知
会话ID
会话类型,只能选{@link SessionTypeEnum#P2P}和{@link SessionTypeEnum#Team}会删漫游消息
删除类型,决定是否删除本地记录和漫游记录,
如果为null,视为{@link DeleteTypeEnum#REMAIN}
如果参数合法,是否向其他端标记此会话为已读
-
downloadAttachment({required NIMMessage message, required bool thumb})
→ Future<NIMResult<void>>
-
-
fetchTeamMessageReceiptDetail({required NIMMessage message, List<String>? accountList})
→ Future<NIMResult<NIMTeamMessageAckInfo>>
-
-
forwardMessage(NIMMessage message, String sessionId, NIMSessionType sessionType)
→ Future<NIMResult<void>>
-
-
getMessagesDynamically(GetMessagesDynamicallyParam param)
→ Future<NIMResult<GetMessagesDynamicallyResult>>
-
-
handleMethodCall(String method, dynamic arguments)
→ Future
-
inherited
-
invokeMethod(String method, {Map<String, dynamic>? arguments})
→ Future<Map<String, dynamic>>
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onEvent(String method, dynamic arguments)
→ Future
-
inherited
-
pullHistoryById(List<NIMMessageKey> msgKeyList, bool persist)
→ Future<NIMResult<List<NIMMessage>>>
-
根据消息关键信息批量查询服务端历史消息。
msgKeyList
消息关键信息列表
persist
查询的漫游消息是否同步到本地数据库。
-
pullMessageHistory(NIMMessage anchor, int limit, bool persist)
→ Future<NIMResult<List<NIMMessage>>>
-
-
pullMessageHistoryExType(NIMMessage anchor, int toTime, int limit, QueryDirection direction, List<NIMMessageType> messageTypeList, bool persist)
→ Future<NIMResult<List<NIMMessage>>>
-
-
queryCollect({NIMCollectInfo? anchor, int toTime = 0, int? type, int limit = 100, QueryDirection direction = QueryDirection.QUERY_OLD})
→ Future<NIMResult<NIMCollectInfoQueryResult>>
-
从服务端分页查询收藏列表
-
queryLastMessage(String account, NIMSessionType sessionType)
→ Future<NIMResult<NIMMessage>>
-
-
queryMessageList(String account, NIMSessionType sessionType, int limit)
→ Future<NIMResult<List<NIMMessage>>>
-
-
queryMessageListByUuid(List<String> uuids, String sessionId, NIMSessionType sessionType)
→ Future<NIMResult<List<NIMMessage>>>
-
-
queryMessageListEx(NIMMessage anchor, QueryDirection direction, int limit)
→ Future<NIMResult<List<NIMMessage>>>
-
-
queryMessagePinForSession(String sessionId, NIMSessionType sessionType)
→ Future<NIMResult<List<NIMMessagePin>>>
-
查询会话所有的 PIN
-
queryMySession(String sessionId, NIMSessionType sessionType)
→ Future<NIMResult<RecentSession>>
-
【会话服务】获取某一个会话
-
queryMySessionList(int minTimestamp, int maxTimestamp, int needLastMsg, int limit, int hasMore)
→ Future<NIMResult<RecentSessionList>>
-
【会话服务】增量获取会话列表,增量+翻页
-
获取快捷评论列表
-
queryReplyCountInThreadTalkBlock(NIMMessage msg)
→ Future<NIMResult<int>>
-
-
queryRoamMsgHasMoreTime(String sessionId, NIMSessionType sessionType)
→ Future<NIMResult<int>>
-
获取是否有更多漫游消息标记的时间戳,如果没有,回调0
-
querySession(NIMSessionInfo sessionInfo)
→ Future<NIMResult<NIMSession>>
-
查询最近联系人会话列表数据(同步接口),可以设置limit, 防止本地会话过多时,导致第一次加载慢
sessionInfo
- 会话信息
-
querySessionList([int? limit])
→ Future<NIMResult<List<NIMSession>>>
-
获取最近会话列表
-
querySessionListFiltered(List<NIMMessageType> filterMessageTypeList)
→ Future<NIMResult<List<NIMSession>>>
-
当希望返回的会话的最近一条消息不是某一类消息时,可以使用以下过滤接口。
-
queryStickTopSession()
→ Future<NIMResult<List<NIMStickTopSessionInfo>>>
-
获取置顶会话信息的列表
-
queryTeamMessageReceiptDetail({required NIMMessage message, List<String>? accountList})
→ Future<NIMResult<NIMTeamMessageAckInfo>>
-
-
queryThreadTalkHistory({required NIMMessage anchor, required int fromTime, required int toTime, required int limit, required QueryDirection direction, required bool persist})
→ Future<NIMResult<NIMThreadTalkHistory>>
-
-
queryTotalUnreadCount({NIMUnreadCountQueryType queryType = NIMUnreadCountQueryType.all})
→ Future<NIMResult<int>>
-
获取未读数总数
-
refreshTeamMessageReceipt(List<NIMMessage> messageList)
→ Future<NIMResult<void>>
-
-
removeCollect(List<NIMCollectInfo> collects)
→ Future<NIMResult<int>>
-
批量移除收藏
-
removeMessagePin(NIMMessage message, String? ext)
→ Future<NIMResult<void>>
-
删除一条消息的PIN
-
删除一条快捷评论
-
removeStickTopSession(String sessionId, NIMSessionType sessionType, String ext)
→ Future<NIMResult<void>>
-
删除一个置顶会话
-
replyMessage({required NIMMessage msg, required NIMMessage replyMsg, required bool resend})
→ Future<NIMResult<void>>
-
-
revokeMessage({required NIMMessage message, String? customApnsText, Map<String, Object>? pushPayload, bool? shouldNotifyBeCount, String? postscript, String? attach})
→ Future<NIMResult<void>>
-
-
saveMessage({required NIMMessage message, required String fromAccount})
→ Future<NIMResult<NIMMessage>>
-
-
saveMessageToLocalEx({required NIMMessage message, required int time})
→ Future<NIMResult<NIMMessage>>
-
-
searchAllMessage(MessageSearchOption searchOption)
→ Future<NIMResult<List<NIMMessage>>>
-
-
searchCloudMessageHistory(MessageKeywordSearchConfig config)
→ Future<NIMResult<List<NIMMessage>>>
-
-
searchMessage(NIMSessionType sessionType, String sessionId, MessageSearchOption searchOption)
→ Future<NIMResult<List<NIMMessage>>>
-
-
searchRoamingMsg(String otherAccid, int fromTime, int endTime, String keyword, int limit, bool reverse)
→ Future<NIMResult<List<NIMMessage>>>
-
-
sendMessage({required NIMMessage message, bool resend = false})
→ Future<NIMResult<NIMMessage>>
-
-
sendMessageReceipt({required String sessionId, required NIMMessage message})
→ Future<NIMResult<void>>
-
发送单聊已读回执
-
sendTeamMessageReceipt(NIMMessage message)
→ Future<NIMResult<void>>
-
发送群消息已读回执
-
setChattingAccount({required String sessionId, required NIMSessionType sessionType})
→ Future<NIMResult<void>>
-
设置当前会话,Android平台可用
调用以下接口重置当前会话,SDK会自动管理消息的未读数。
该接口会自动调用clearUnreadCount(String, SessionTypeEnum)将正在聊天对象的未读数清零。
如果有新消息到达,且消息来源是正在聊天的对象,其未读数也不会递增。
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateCollect(NIMCollectInfo info)
→ Future<NIMResult<NIMCollectInfo>>
-
更新一个收藏的扩展字段
-
updateMessage(NIMMessage message)
→ Future<NIMResult<void>>
-
-
updateMessagePin(NIMMessage message, String? ext)
→ Future<NIMResult<void>>
-
更新一条消息的PIN
-
updateMySession(String sessionId, NIMSessionType sessionType, String ext)
→ Future<NIMResult<void>>
-
【会话服务】更新某一个会话,主要是设置会话的ext字段,如果会话不存在,则会创建出来,此时会话没有lastMsg
-
updateRoamMsgHasMoreTag(NIMMessage newTag)
→ Future<NIMResult<void>>
-
更新是否有更多漫游消息的标记
-
updateSession({required NIMSession session, bool needNotify = false})
→ Future<NIMResult<void>>
-
更新会话对象
-
updateSessionWithMessage({required NIMMessage message, bool needNotify = false})
→ Future<NIMResult<void>>
-
使用消息更新会话对象
-
updateStickTopSession(String sessionId, NIMSessionType sessionType, String ext)
→ Future<NIMResult<void>>
-
更新一个会话在置顶上的扩展字段
-
voiceToText({required NIMMessage message, String? scene, String? mimeType, String? sampleRate})
→ Future<NIMResult<String>>
-