V2TIMMessageManager class Manager
提供高级消息处理相关接口
addAdvancedMsgListener 添加高级消息的事件监听器
removeAdvancedMsgListener 移除高级消息监听器
sendCustomMessage 创建自定义消息
sendImageMessage 创建图片消息(图片最大支持 28 MB)
sendSoundMessage 创建语音消息(语音最大支持 28 MB)
sendVideoMessage 创建视频消息(视频最大支持 100 MB)
sendVideoMessage 创建文件消息(文件最大支持 100 MB)
getC2CHistoryMessageList 获取单聊历史消息
getGroupHistoryMessageList 获取群组历史消息
getHistoryMessageList 获取历史消息高级接口
revokeMessage 撤回消息
markC2CMessageAsRead 设置单聊消息已读
markGroupMessageAsRead 设置群组消息已读
deleteMessageFromLocalStorage 删除本地消息
deleteMessages 删除本地及漫游消息
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAdvancedMsgListener(
{required Function listener}) → void - 添加高级消息的事件监听器
-
deleteMessageFromLocalStorage(
{required String msgID}) → Future< V2TimCallback> - 删除本地消息
-
deleteMessages(
{required List< String> msgIDs}) → Future<V2TimCallback> - 删除本地及漫游消息
-
getC2CHistoryMessageList(
{required String userID, required int count, String? lastMsgID}) → Future< V2TimValueCallback< List< >V2TimMessage> > - 获取单聊历史消息
-
getGroupHistoryMessageList(
{required String groupID, required int count, String? lastMsgID}) → Future< V2TimValueCallback< List< >V2TimMessage> > - 获取群组历史消息
-
getHistoryMessageList(
{int getType = HistoryMessageGetType.V2TIM_GET_LOCAL_OLDER_MSG, String? userID, String? groupID, required int count, String? lastMsgID}) → Future< V2TimValueCallback< List< >V2TimMessage> > - 获取历史消息高级接口
-
insertC2CMessageToLocalStorage(
{required String data, required String userID, required String sender}) → Future< V2TimValueCallback< V2TimMessage> > - 向C2C消息列表中添加一条消息
-
insertGroupMessageToLocalStorage(
{required String data, required String groupID, required String sender}) → Future< V2TimValueCallback< V2TimMessage> > - 向群组消息列表中添加一条消息
-
markC2CMessageAsRead(
{required String userID}) → Future< V2TimCallback> - 设置单聊消息已读
-
markGroupMessageAsRead(
{required String groupID}) → Future< V2TimCallback> - 设置群组消息已读
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAdvancedMsgListener(
) → void - 移除高级消息监听器
-
revokeMessage(
{required String msgID}) → Future< V2TimCallback> - 撤回消息
-
sendCustomMessage(
{required String data, required String receiver, String? groupID, int? priority = 0, String? desc = "", String? extension = "", bool onlineUserOnly = false}) → Future< V2TimValueCallback< V2TimMessage> > - 发送自定义消息
-
sendFileMessage(
{required String filePath, required String fileName, required String receiver, String? groupID, int? priority = 0, bool onlineUserOnly = false}) → Future< V2TimValueCallback< V2TimMessage> > - 发送文件
-
sendImageMessage(
{required String imagePath, required String receiver, String? groupID, int priority = 0, bool onlineUserOnly = false}) → Future< V2TimValueCallback< V2TimMessage> > - 发送图片消息
-
sendSoundMessage(
{required String soundPath, required String receiver, int? duration, String? groupID, int? priority, bool onlineUserOnly = false}) → Future< V2TimValueCallback< V2TimMessage> > - 发送文件
-
sendTextMessage(
{required String text, required dynamic receiver, String? groupID, int? priority = 0, bool onlineUserOnly = false}) → Future< V2TimValueCallback< V2TimMessage> > - 发送自定义消息
-
sendVideoMessage(
{required String videoFilePath, required String receiver, required String type, String? snapshotPath, int? duration, String? groupID, int? priority, bool? onlineUserOnly}) → Future< V2TimValueCallback< V2TimMessage> > - 发送视频消息
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited