Package io.rong.imlib
Class NativeObject
-
- All Implemented Interfaces:
public class NativeObject
-
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description void
init(Context context, String soDir)
boolean
isSoLoadFinished()
是否so已经加载完成 native boolean
ClearMessages(int conversationType, String targetId, boolean clearDB, String channelId)
清空某一会话的所有聊天消息记录。 native void
CreateInviteDiscussion(String name, Array<String> userIds, NativeObject.CreateDiscussionCallback callback)
创建讨论组 native void
InviteMemberToDiscussion(String discussionId, Array<String> userIds, NativeObject.PublishAckListener callback)
邀请用户加入讨论组。 native void
RemoveMemberFromDiscussion(String discussionId, String userId, NativeObject.PublishAckListener callback)
供管理员将某用户移出讨论组,移出自己或者非讨论组创建者执行移出操作将产生错误。 native boolean
RemoveMemberFromDiscussionSync(String discussionId, String userId)
native void
QuitDiscussion(String discussionId, NativeObject.PublishAckListener callback)
退出自己所在的某讨论组。 native NativeObject.UserInfo
GetUserInfoExSync(String userId, int categoryId)
native void
GetDiscussionInfo(String discussionId, NativeObject.DiscussionInfoListener callback)
native NativeObject.DiscussionInfo
GetDiscussionInfoSync(String discussionId)
native void
RenameDiscussion(String targetId, String discussionName, NativeObject.PublishAckListener publishAckListener)
native void
SetInviteStatus(String targetId, int status, NativeObject.PublishAckListener callback)
native void
JoinChatRoom(String targetId, int categoryId, int messageCount, boolean flag, NativeObject.PublishAckListener callback, int joinMode)
加入聊天室 native void
JoinChatRoom(String targetId, int categoryId, int messageCount, boolean flag, NativeObject.JoinChatroomCallback callback, int joinMode)
native void
JoinExistingChatroom(String targetId, int categoryId, int messageCount, NativeObject.JoinChatroomCallback callback, boolean keepMsg, int joinMode)
加入已存在的聊天室。如果聊天室不存在,则加入失败。 native void
QuitChatRoom(String targetId, int categoryId, NativeObject.PublishAckListener callback)
native void
GetUploadToken(int fileType, String fileName, String httpMethod, String queryInfo, String downloadUrl, NativeObject.FileTokenListener callback)
native void
GetDownloadUrl(int fileType, String mimeKey, String fileName, NativeObject.TokenListener callback, int server_type)
native void
SubscribeAccount(String targetId, int categoryId, boolean subscribe, NativeObject.PublishAckListener callback)
native void
SearchAccount(String keyWords, int businessType, int searchType, NativeObject.AccountInfoListener callback)
native void
GetChatroomHistoryMessage(String targetId, long dataTime, int count, int order, NativeObject.HistoryMessageListener callback, String channelId)
native Array<NativeObject.AccountInfo>
LoadAccountInfo()
native boolean
QueryChatroomInfo(String targetId, int count, int order, NativeObject.ChatroomInfoListener callback)
native void
SetChatRoomStatus(String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
native void
BindRTCRoomForChatroom(String chatRoomId, String rtcRoomId, NativeObject.PublishAckListener listener)
native void
DeleteChatRoomStatus(String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
native String
GetChatRoomStatusByKey(String roomId, String key)
native HashMap<String, String>
GetChatRoomStatus(String roomId)
native void
SetChatRoomStatusNotificationListener(NativeObject.StatusNotificationListener listener)
native void
SetChatroomEventListener(NativeObject.ChatroomEventListener listener)
native void
SetChatRoomKV(String roomId, Array<NativeObject.StatusData> status, NativeObject.StatusNotification notification, NativeObject.SetChatroomKVCallback callback)
native void
GetChatRoomKV(String roomId, NativeObject.ChatroomKVCallback callback)
native void
DeleteChatRoomKV(String roomId, Array<NativeObject.StatusData> status, NativeObject.StatusNotification notification, NativeObject.SetChatroomKVCallback callback)
native int
GetTopStatus(String targetId, int conversationType, String channelId)
native boolean
ClearUnreadCountForTag(String tagId)
native boolean
ClearConversationForTag(String tagId, boolean deleteMessage)
native int
GetUnreadCountByObjectName(String tagId, int conversationType, Array<String> objectNames, String channelId)
native boolean
ClearChatroomMessageAndKV(String roomId, boolean clearMsg, boolean clearKV)
native NativeObject.MsgUidInfo
GetMessageUid(String targetId, int conversationType, String channelId, long startTime, long endTime, int limit)
-
-
Method Detail
-
init
void init(Context context, String soDir)
-
isSoLoadFinished
boolean isSoLoadFinished()
是否so已经加载完成
- Since:
5.6.7
-
ClearMessages
native boolean ClearMessages(int conversationType, String targetId, boolean clearDB, String channelId)
清空某一会话的所有聊天消息记录。
- Parameters:
conversationType
- 会话类型targetId
- 会话 IdclearDB
- 是否整理数据库,清理空间。channelId
- 消息所属会话的业务标识。
-
CreateInviteDiscussion
native void CreateInviteDiscussion(String name, Array<String> userIds, NativeObject.CreateDiscussionCallback callback)
创建讨论组
- Parameters:
name
- 讨论组名称。如当前所有成员的名字的组合userIds
- 邀请的用户 Id 列表callback
- 创建讨论组成功后的回调
-
InviteMemberToDiscussion
native void InviteMemberToDiscussion(String discussionId, Array<String> userIds, NativeObject.PublishAckListener callback)
邀请用户加入讨论组。
- Parameters:
discussionId
- 讨论组 IduserIds
- 邀请的用户 Id 列表callback
- 操作回调
-
RemoveMemberFromDiscussion
native void RemoveMemberFromDiscussion(String discussionId, String userId, NativeObject.PublishAckListener callback)
供管理员将某用户移出讨论组,移出自己或者非讨论组创建者执行移出操作将产生错误。
- Parameters:
discussionId
- 讨论组 IduserId
- 用户 Idcallback
- 操作回调
-
RemoveMemberFromDiscussionSync
native boolean RemoveMemberFromDiscussionSync(String discussionId, String userId)
-
QuitDiscussion
native void QuitDiscussion(String discussionId, NativeObject.PublishAckListener callback)
退出自己所在的某讨论组。
- Parameters:
discussionId
- 讨论组 Idcallback
- 操作回调
-
GetUserInfoExSync
native NativeObject.UserInfo GetUserInfoExSync(String userId, int categoryId)
-
GetDiscussionInfo
native void GetDiscussionInfo(String discussionId, NativeObject.DiscussionInfoListener callback)
-
GetDiscussionInfoSync
native NativeObject.DiscussionInfo GetDiscussionInfoSync(String discussionId)
-
RenameDiscussion
native void RenameDiscussion(String targetId, String discussionName, NativeObject.PublishAckListener publishAckListener)
-
SetInviteStatus
native void SetInviteStatus(String targetId, int status, NativeObject.PublishAckListener callback)
-
JoinChatRoom
native void JoinChatRoom(String targetId, int categoryId, int messageCount, boolean flag, NativeObject.PublishAckListener callback, int joinMode)
加入聊天室
- Parameters:
targetId
- 会话 IdcategoryId
- 会话类型messageCount
- 加入时同步的消息条数flag
- 是否使用缓存时间和服务端同步消息。当断线重连时,SDK 会自动重新加入之前的聊天室,此时需要使用上次缓存的时间进行消息同步。callback
- 回调
-
JoinChatRoom
native void JoinChatRoom(String targetId, int categoryId, int messageCount, boolean flag, NativeObject.JoinChatroomCallback callback, int joinMode)
-
JoinExistingChatroom
native void JoinExistingChatroom(String targetId, int categoryId, int messageCount, NativeObject.JoinChatroomCallback callback, boolean keepMsg, int joinMode)
加入已存在的聊天室。如果聊天室不存在,则加入失败。
- Parameters:
targetId
- 会话 IdcategoryId
- 会话类型messageCount
- 加入时同步的消息条数。callback
- 回调keepMsg
- 是否使用缓存时间和服务端同步消息。当断线重连时,SDK 会自动重新加入之前的聊天室,此时需要使用上次缓存的时间进行消息同步。joinMode
- 加入模式。内部为 RTC 进行的封装,目前已废弃。
-
QuitChatRoom
native void QuitChatRoom(String targetId, int categoryId, NativeObject.PublishAckListener callback)
-
GetUploadToken
native void GetUploadToken(int fileType, String fileName, String httpMethod, String queryInfo, String downloadUrl, NativeObject.FileTokenListener callback)
-
GetDownloadUrl
native void GetDownloadUrl(int fileType, String mimeKey, String fileName, NativeObject.TokenListener callback, int server_type)
-
SubscribeAccount
native void SubscribeAccount(String targetId, int categoryId, boolean subscribe, NativeObject.PublishAckListener callback)
-
SearchAccount
native void SearchAccount(String keyWords, int businessType, int searchType, NativeObject.AccountInfoListener callback)
-
GetChatroomHistoryMessage
native void GetChatroomHistoryMessage(String targetId, long dataTime, int count, int order, NativeObject.HistoryMessageListener callback, String channelId)
-
LoadAccountInfo
native Array<NativeObject.AccountInfo> LoadAccountInfo()
-
QueryChatroomInfo
native boolean QueryChatroomInfo(String targetId, int count, int order, NativeObject.ChatroomInfoListener callback)
-
SetChatRoomStatus
native void SetChatRoomStatus(String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
-
BindRTCRoomForChatroom
native void BindRTCRoomForChatroom(String chatRoomId, String rtcRoomId, NativeObject.PublishAckListener listener)
-
DeleteChatRoomStatus
native void DeleteChatRoomStatus(String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
-
GetChatRoomStatusByKey
native String GetChatRoomStatusByKey(String roomId, String key)
-
GetChatRoomStatus
native HashMap<String, String> GetChatRoomStatus(String roomId)
-
SetChatRoomStatusNotificationListener
native void SetChatRoomStatusNotificationListener(NativeObject.StatusNotificationListener listener)
-
SetChatroomEventListener
native void SetChatroomEventListener(NativeObject.ChatroomEventListener listener)
-
SetChatRoomKV
native void SetChatRoomKV(String roomId, Array<NativeObject.StatusData> status, NativeObject.StatusNotification notification, NativeObject.SetChatroomKVCallback callback)
-
GetChatRoomKV
native void GetChatRoomKV(String roomId, NativeObject.ChatroomKVCallback callback)
-
DeleteChatRoomKV
native void DeleteChatRoomKV(String roomId, Array<NativeObject.StatusData> status, NativeObject.StatusNotification notification, NativeObject.SetChatroomKVCallback callback)
-
GetTopStatus
native int GetTopStatus(String targetId, int conversationType, String channelId)
-
ClearUnreadCountForTag
native boolean ClearUnreadCountForTag(String tagId)
-
ClearConversationForTag
native boolean ClearConversationForTag(String tagId, boolean deleteMessage)
-
GetUnreadCountByObjectName
native int GetUnreadCountByObjectName(String tagId, int conversationType, Array<String> objectNames, String channelId)
-
ClearChatroomMessageAndKV
native boolean ClearChatroomMessageAndKV(String roomId, boolean clearMsg, boolean clearKV)
-
GetMessageUid
native NativeObject.MsgUidInfo GetMessageUid(String targetId, int conversationType, String channelId, long startTime, long endTime, int limit)
-
-
-
-