SDK 公开面与文档覆盖

本页回答一个具体问题:这个平台导出的每个公开方法、事件、枚举与数据类型,在文档中心的哪一页被说明?页面由 SDK 制品公开面(api-surface 快照)与 IDL 绑定声明生成,逐项给出签名与文档位置;差异(多余/缺失的方法)如实标注,不做静默补齐。

口径

契约(IDL 语义操作)是语义权威:方法名、参数、返回、错误码、示例都以功能页为准。

制品快照用于确认该平台是否真的导出了该方法;快照与实现不一致时,页面标注差异而不是猜测。

本页只做索引与核对,不重复功能页的参数表与示例。

来源与口径​

项内容
制品公开面已读取该平台的 api-surface 快照(103 个公开方法)
契约语义IDL 1.0.0 的 103 个语义操作 + 16 个事件
绑定签名来自 IDL 绑定声明的方法签名(各平台语言风格)
口径说明制品公开面快照的方法表为 91 项,比 IDL 的 102 个语义操作少 11 项(推送令牌与超级群频道/用户组);这些方法已在 SDK 中实现,快照未同步。页面以 IDL 语义为准,并在此标注快照差异。

覆盖摘要​

类别数量文档承载位置
IDL 语义操作103功能页(每操作:说明 + 参数表 + 返回值 + 错误码 + 示例)
绑定便捷方法0—
事件16本页事件表 + 连接监听
枚举 / 常量4API 参考「枚举」各页
数据类型58API 参考「类」各页 + 方法参数/返回值表

公开方法索引​

下表逐项列出本平台导出的公开方法(IDL 语义操作在前,绑定便捷方法在后),并给出承载页面。功能页内的每个操作都有独立的参数表、返回值、错误码与可运行示例。

方法本平台签名 / 形态文档位置
initRCIMIWEngine.create(String appKey, RCIMIWEngineOptions options)建立连接
connectconnect(String token, int timeout, {RCIMIWConnectCallback? callback})建立连接
disconnectdisconnect(bool receivePush)建立连接
getConnectionStatusgetConnectionStatus()建立连接
getCurrentUserIdgetCurrentUserId()连接监听
addEventListeneraddEventListener(String event, void Function(Object?) handler)连接监听
removeEventListenerremoveEventListener(String event, void Function(Object?) handler)连接监听
sendMessagesendMessage(int conversationType, String targetId, MessageContent content, {MessageOptions? options})发送消息
sendTextMessagesendTextMessage(int conversationType, String targetId, String text, {MessageOptions? options})发送消息
sendImageMessagesendImageMessage(int conversationType, String targetId, ImageContent content, {MessageOptions? options})发送消息
sendFileMessagesendFileMessage(int conversationType, String targetId, FileContent content, {MessageOptions? options})发送消息
sendVoiceMessagesendVoiceMessage(int conversationType, String targetId, VoiceContent content, {MessageOptions? options})发送消息
sendLocationMessagesendLocationMessage(int conversationType, String targetId, LocationContent content, {MessageOptions? options})发送消息
sendTypingStatussendTypingStatus(int conversationType, String targetId, bool typing)输入状态
recallMessagerecallMessage(String messageId)消息管理
sendReadReceiptsendReadReceipt(int conversationType, String targetId, List<String> messageIds)已读回执
getMessageReadCountgetMessageReadCount(String messageId)已读回执
getMessageReadUsersgetMessageReadUsers(String messageId, {int offset, int limit})已读回执
getMessageReadDetailgetMessageReadDetail(String messageId, {int offset, int limit, String? filter})API 参考索引
searchMessagessearchMessages({required String keyword, int limit})消息管理
getConversationListgetConversationList()会话列表
getConversationgetConversation(int conversationType, String targetId)会话列表
getHistoryMessagesgetHistoryMessages(int conversationType, String targetId, {int limit, int? beforeSeq, String? channelId})历史消息
clearUnreadCountclearUnreadCount(int conversationType, String targetId)未读数
setConversationToTopsetConversationToTop(int conversationType, String targetId, bool isTop)置顶与免打扰
saveTextMessageDraftsaveTextMessageDraft(int conversationType, String targetId, String draft)草稿
getTextMessageDraftgetTextMessageDraft(int conversationType, String targetId)草稿
clearTextMessageDraftclearTextMessageDraft(int conversationType, String targetId)草稿
setConversationNotificationLevelsetConversationNotificationLevel(int conversationType, String targetId, int level)置顶与免打扰
getUserProfilegetUserProfile(String userId)用户资料
updateMyUserProfileupdateMyUserProfile({String? name, String? avatarUrl})用户资料
getOnlineStatusgetOnlineStatus(String userId)在线状态
getOnlineStatusBatchgetOnlineStatusBatch(List<String> userIds)在线状态
searchUserssearchUsers(String keyword, {int limit})好友列表
sendFriendRequestsendFriendRequest(String toUserId, {String? message})好友请求
getFriendRequestsgetFriendRequests({String? type, String? status})好友请求
acceptFriendRequestacceptFriendRequest(String requestId)好友请求
rejectFriendRequestrejectFriendRequest(String requestId)好友请求
getFriendsgetFriends()好友列表
deleteFrienddeleteFriend(String friendId)好友列表
setFriendRemarksetFriendRemark(String friendId, String remark)好友列表
getBlacklistgetBlacklist()黑名单
addToBlacklistaddToBlacklist(String userId)黑名单
removeFromBlacklistremoveFromBlacklist(String userId)黑名单
createGroupcreateGroup(String name, List<String> memberIds, {String? groupId, String? owner, GroupOptions? options})创建群组
getGroupsInfogetGroupsInfo(List<String> groupIds)创建群组
getGroupMembersgetGroupMembers(String groupId)群成员
addGroupMembersaddGroupMembers(String groupId, List<String> userIds)群成员
removeGroupMembersremoveGroupMembers(String groupId, List<String> userIds)群成员
quitGroupquitGroup(String groupId)群成员
updateGroupNameupdateGroupName(String groupId, String name)群管理
updateGroupNoticeupdateGroupNotice(String groupId, String notice)群管理
transferGroupOwnertransferGroupOwner(String groupId, String newOwner)群管理
addGroupAdminaddGroupAdmin(String groupId, String userId)群管理
removeGroupAdminremoveGroupAdmin(String groupId, String userId)群管理
muteGroupMembermuteGroupMember(String groupId, String userId, int mutedUntil)群管理
createChatroomcreateChatroom({String? chatroomId, required String name, String? owner})加入与退出
joinChatroomjoinChatroom(String chatroomId)加入与退出
leaveChatroomleaveChatroom(String chatroomId)加入与退出
getChatroomInfogetChatroomInfo(String chatroomId)聊天室信息
getChatroomMembersgetChatroomMembers(String chatroomId, {int offset, int limit})聊天室信息
getSystemMessagesgetSystemMessages({int limit, int? beforeSeq})系统通知
uploadFileuploadFile(List<int> data, String name, {String? mime})文件上传
updateMessageExpansionupdateMessageExpansion(String messageId, Map<String, String> expansion)消息进阶
removeMessageExpansionremoveMessageExpansion(String messageId, List<String> keys)消息进阶
addMessageReactionaddMessageReaction(int conversationType, String targetId, String messageId, String reactionId)消息进阶
removeMessageReactionremoveMessageReaction(int conversationType, String targetId, String messageId, String reactionId)消息进阶
batchGetMessageReactionSummariesbatchGetMessageReactionSummaries(int conversationType, String targetId, List<String> messageIds)消息进阶
getMessageReactionsgetMessageReactions(int conversationType, String targetId, String messageId, {int? count, String? pageToken})消息进阶
getMessageReactionUsersgetMessageReactionUsers(int conversationType, String targetId, String messageId, String reactionId, {int? count, String? pageToken})消息进阶
createConversationTagcreateConversationTag(String tagName, {CreateConversationTagOptions? options})会话标签与分组
updateConversationTagupdateConversationTag(String tagId, String tagName)会话标签与分组
deleteConversationTagdeleteConversationTag(String tagId)会话标签与分组
getConversationTagsgetConversationTags()会话标签与分组
addConversationsToTagaddConversationsToTag(String tagId, List<ConversationRef> conversations)会话标签与分组
removeConversationsFromTagremoveConversationsFromTag(String tagId, List<ConversationRef> conversations)会话标签与分组
getConversationsFromTagByPagegetConversationsFromTagByPage(String tagId, {ConversationTagPageOptions? options})会话标签与分组
getTagsFromConversationgetTagsFromConversation(int conversationType, String targetId)会话标签与分组
getUnreadCountByTaggetUnreadCountByTag(String tagId)会话标签与分组
setConversationToTopInTagsetConversationToTopInTag(String tagId, int conversationType, String targetId, bool top)会话标签与分组
deleteConversationdeleteConversation(int conversationType, String targetId)会话删除与类型免打扰
getConversationTypeNotificationgetConversationTypeNotification(int conversationType)会话删除与类型免打扰
setConversationTypeNotificationsetConversationTypeNotification(int conversationType, int level)会话删除与类型免打扰
startStreamMessagestartStreamMessage(int conversationType, String targetId, {StartStreamMessageOptions? options})消息进阶
appendStreamMessageappendStreamMessage(String streamId, String delta, {AppendStreamMessageOptions? options})消息进阶
completeStreamMessagecompleteStreamMessage(String streamId)消息进阶
getStreamMessagegetStreamMessage(String streamId)消息进阶
getMessageExpansiongetMessageExpansion(String messageId)消息进阶
combineMessagescombineMessages(List<Message> messages, {CombineMessagesOptions? options})消息进阶
subscribePresencesubscribePresence(List<String> userIds)在线状态订阅与推送令牌
unsubscribePresenceunsubscribePresence(List<String> userIds)在线状态订阅与推送令牌
getPresenceSubscriptionsgetPresenceSubscriptions()在线状态订阅与推送令牌
registerPushTokenregisterPushToken(RegisterPushTokenOptions options)在线状态订阅与推送令牌
unregisterPushTokenunregisterPushToken(String tokenId)在线状态订阅与推送令牌
getPushTokensgetPushTokens()在线状态订阅与推送令牌
createSupergroupChannelcreateSupergroupChannel(CreateSupergroupChannelParams params)超级群频道与用户组
listSupergroupChannelslistSupergroupChannels(String groupId)超级群频道与用户组
joinSupergroupChanneljoinSupergroupChannel(String channelId, {SupergroupChannelOptions? options})超级群频道与用户组
leaveSupergroupChannelleaveSupergroupChannel(String channelId, {SupergroupChannelOptions? options})超级群频道与用户组
bindUserGroupToChannelbindUserGroupToChannel(String channelId, String userGroupId, {SupergroupChannelOptions? options})超级群频道与用户组
createUserGroupcreateUserGroup(CreateUserGroupParams params)超级群频道与用户组
listUserGroupslistUserGroups(String groupId)超级群频道与用户组
getUserGroupsByUsergetUserGroupsByUser(String userId, {SupergroupChannelOptions? options})超级群频道与用户组

事件索引​

事件名在所有 GA 平台一致(Web 为小写下划线常量值,原生平台为枚举成员)。事件订阅方式见连接监听页;载荷字段来自 IDL 事件定义。

事件载荷本平台导出文档位置
CONNECTING{attempt:int}是API 参考 · 事件载荷
CONNECTED{userId:string, sessionId?:string}是API 参考 · 事件载荷
DISCONNECT{code:int, reason:string}是API 参考 · 事件载荷
SUSPEND{code:int, reason:string}是API 参考 · 事件载荷
MESSAGES{messages:Message[]}是API 参考 · 事件载荷
CONVERSATION{conversation:Conversation}是API 参考 · 事件载荷
MESSAGE_RECALLED{message:Message}是API 参考 · 事件载荷
READ_RECEIPTReadReceipt是API 参考 · 事件载荷
TYPING{conversationType:ConversationType,targetId:string,userId:string,typing:bool,timestamp:int64}是API 参考 · 事件载荷
MESSAGE_REACTION_CHANGED{messageId:string,conversationType:ConversationType,targetId:string,reactionId:string,operation:added|removed|cleared,userId:string,reactionTime:int64,totalCount:uint32,users:string[]?}是API 参考 · 事件载荷
MESSAGE_EXPANSION_CHANGED{messageId:string,conversationType:ConversationType,targetId:string,updated:Record<string,string>?,removed:string[]?,timestamp:int64}是API 参考 · 事件载荷
STREAM_MESSAGE_CHANGED{streamId:string,messageId:string,conversationType:ConversationType,targetId:string,senderId:string,delta:string,seq:uint32,text:string,status:streaming|ended,complete:bool,timestamp:int64}是API 参考 · 事件载荷
PRESENCE_CHANGED{userId:string,online:bool,lastSeenAt:int64,timestamp:int64,reason:connect|disconnect|kick|deactivate}是API 参考 · 事件载荷
FRIEND_EVENT{kind:FriendEventKind,request?:FriendRequest,fromUserId?:string,toUserId?:string,timestamp:int64}是API 参考 · 事件载荷
CHATROOM_EVENT{chatroomId:string,kind:ChatroomEventKind,userId?:string,onlineCount?:uint32,chatroom?:Chatroom,timestamp:int64}是API 参考 · 事件载荷
KICKED{code:int,reason:string}是API 参考 · 事件载荷

枚举与常量索引​

枚举取值在 API 参考的「枚举」页逐项列出(名称、取值、语义),错误码另有状态码页。

常量 / 枚举取值数文档位置
RongIMConversationType—枚举 · conversation-type
RongIMConnectionStatus—枚举 · connection-status
RongIMErrorCode—枚举 · error-code
CONTENT_TYPE_COMBINE—状态码与错误处理

数据类型索引​

公开数据类型分两类:有独立页面的核心结构(消息、会话、群组、内容联合体等),以及只作为参数/返回结构出现的选项与结果对象(字段在对应方法的参数表与返回值中说明)。

随方法说明的类型​

ChannelType、CombineContent、Config、Content、ConversationRef、ConversationTag、ConversationTagConversation、Conversations、Count、Counts、CurrentUserReacted、GroupId、Groups、IMClient、Id、Ids、Inactive、Indexed、Info、JoinPolicy、Joined、MaxChars、Member、Members、MentionedInfo、MessageReadDetailItem、More、Ms、MsgId、Names、Policy、PushToken、Quote、ReactionSummary、Seq、StreamMessage、SupergroupChannel、Time、Token、Total、Type、Until、Url、UserGroup、Version

平台导出的类型与包符号​

制品公开面还导出 19 个平台类型/包符号(选项对象、回调、传输层与结果结构);IDL 语义面之外的符号在对应方法的参数表与返回值中说明,或由包内的类型声明提供。

RCIMIWEngine、RCIMIWEngineOptions、RCIMIWErrorCode、RCIMIWUnsupportedException、GroupOptions、IMClientOptions、ImStore、ImStoreFormatException、ImStoreMigration、ImStoreWriteException、MemoryImStore、imStoreSchemaVersion、ImStoreBackend、SharedPrefsImStore、SharedPreferencesImStoreBackend、defaultImStoreMigrations、migrateImStoreV0ToV1、RcResult、RongIMNotInitializedException

如何反馈差异​

  • 方法语义与签名:以 功能列表 与各功能页为准;
  • 错误码与重试:见 状态码;
  • 若发现“制品导出但文档未说明”或“文档说明但制品未导出”,请提交到文档反馈渠道,会按版本更新日志同步。