public class NativeObject
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
protected void |
AddPushSetting(java.lang.String startTime,
int spanMins,
NativeObject.PublishAckListener callback)
设置拒收push信息时间 startTime 起始时间 格式 HH:MM:SS spanMins 间隔分钟数 0 < t < 1440
|
protected void |
AddToBlacklist(java.lang.String userId,
NativeObject.PublishAckListener callback)
将某个用户加到黑名单中
|
protected void |
AnswerRTCLiveInvitation(java.lang.String roomId,
int answer,
java.lang.String anchorId,
java.lang.String peerRoomId,
java.lang.String sessionId,
java.lang.String content,
java.lang.String key,
java.lang.String value,
NativeObject.PublishAckListener callback) |
protected void |
CancelRTCLiveInvitation(java.lang.String roomId,
java.lang.String anchorId,
java.lang.String peerRoomId,
java.lang.String inviteInfo,
java.lang.String sessionId,
NativeObject.PublishAckListener callback) |
protected boolean |
CleanHistoryMessages(int conversationType,
java.lang.String targetId,
long recordTime)
从本地清除历史消息
|
protected void |
CleanRemoteHistoryMessage(int conversationType,
java.lang.String targetId,
long recordTime,
NativeObject.PublishAckListener callback)
从服务端清除历史消息
|
protected boolean |
ClearConversations(int[] conversationTypes)
清空所有会话及会话消息
|
protected boolean |
ClearEncryptedConversations()
clear encrypted conversations
|
protected boolean |
ClearMessages(int conversationType,
java.lang.String targetId,
boolean clearDB)
清空某一会话的所有聊天消息记录。
|
protected boolean |
ClearUnread(int conversationType,
java.lang.String targetId)
TODO 需攀哥来增加备注
|
protected boolean |
ClearUnreadByReceipt(java.lang.String targetId,
int categoryId,
long timestamp) |
protected int |
Connect(java.lang.String token,
NativeObject.ConnectionEntry[] connectionEntities,
java.lang.String userId,
NativeObject.UserProfile userProfile)
连接服务器
|
protected boolean |
CreateEncryptedConversation(java.lang.String targetId,
java.lang.String encTargetId,
java.lang.String encRemoteId,
java.lang.String encKey,
java.lang.String encXa,
int encStatus)
create encrypted conversation
|
protected void |
CreateInviteDiscussion(java.lang.String name,
java.lang.String[] userIds,
NativeObject.CreateDiscussionCallback callback)
创建讨论组
|
protected void |
DeleteChatRoomStatus(java.lang.String roomId,
NativeObject.StatusData statusData,
NativeObject.StatusNotification statusNotification,
NativeObject.PublishAckListener callback) |
protected boolean |
DeleteMessages(long[] idList)
删除指定的消息。
|
protected void |
DeleteRemoteMessages(int conversationType,
java.lang.String targetId,
NativeObject.Message[] messageList,
boolean isDeleteLocal,
NativeObject.PublishAckListener callback)
删除指定会话的消息。
|
protected void |
Disconnect(int state,
boolean isCloseDB)
断开服务器连接
|
protected int |
EnvironmentChangeNotify(int type) |
protected void |
ExitRTCRoom(java.lang.String roomId,
NativeObject.PublishAckListener callback) |
protected void |
GetBlacklist(NativeObject.SetBlacklistListener callback)
获取当前用户的黑名单列表
|
protected void |
GetBlacklistStatus(java.lang.String userId,
NativeObject.BizAckListener callback)
获取某用户是否在黑名单中
|
protected NativeObject.Conversation[] |
GetBlockedConversations(int[] conversationTypes) |
protected int |
GetBlockPush(java.lang.String targetId,
int categoryId) |
protected int |
GetCateUnreadCount(int[] conversationTypes,
boolean withDND)
根据会话列表来取未读消息数
|
protected void |
GetChatroomHistoryMessage(java.lang.String targetId,
long dataTime,
int count,
int order,
NativeObject.HistoryMessageListener callback) |
protected java.util.HashMap<java.lang.String,java.lang.String> |
GetChatRoomStatus(java.lang.String roomId) |
protected java.lang.String |
GetChatRoomStatusByKey(java.lang.String roomId,
java.lang.String key) |
protected NativeObject.Conversation |
GetConversationEx(java.lang.String targetId,
int conversationType) |
protected NativeObject.Conversation[] |
GetConversationList(int[] conversationTypes,
long timeStamp,
int count) |
protected NativeObject.Conversation[] |
GetConversationListEx(int[] conversationTypes) |
protected long |
GetDeltaTime()
获取本地时间与服务器时间差值。
|
protected void |
GetDiscussionInfo(java.lang.String discussionId,
NativeObject.DiscussionInfoListener callback) |
protected NativeObject.DiscussionInfo |
GetDiscussionInfoSync(java.lang.String discussionId) |
protected int |
GetDNDUnreadCount(NativeObject.Conversation[] conversations)
免打扰 do not disturb
|
void |
GetDownloadUrl(int fileType,
java.lang.String mimeKey,
java.lang.String fileName,
NativeObject.TokenListener callback,
boolean is_oss) |
protected RCEncryptedSession |
GetEncryptedConversationInfo(java.lang.String targetId)
get encrypted conversation info
|
protected java.util.List<RCEncryptedSession> |
GetEncryptedConversations()
获取当前用户所有的加密会话
|
protected NativeObject.Message[] |
GetHistoryMessagesByObjectNames(java.lang.String targetId,
int category,
java.lang.String[] clazzNames,
long timestamp,
int count,
boolean flag)
获取某类历史消息记录。
|
protected NativeObject.Message[] |
GetHistoryMessagesEx(java.lang.String targetId,
int category,
java.lang.String clazzName,
long lastId,
int count,
boolean flag)
获取某类历史消息记录。
|
protected java.lang.String |
GetHttpDnsAccountId() |
protected java.lang.String |
GetHttpDnsSecret() |
protected NativeObject.Message[] |
GetMatchedMessages(java.lang.String targetId,
int categoryId,
long timestamp,
int before,
int after) |
protected NativeObject.Message[] |
GetMentionMessages(java.lang.String targetId,
int categoryId)
获取@消息。
|
protected NativeObject.Message |
GetMessageById(long messageId) |
protected NativeObject.Message |
GetMessageByUId(java.lang.String messageUId) |
protected int |
GetMessageCount(java.lang.String targetId,
int conversationType) |
protected java.lang.String |
GetOfflineMessageDuration() |
protected java.lang.String |
GetPushSetting(int key) |
protected void |
GetRTCConfig(java.lang.String model,
java.lang.String OSVersion,
long timestamp,
java.lang.String sdkVersion,
NativeObject.RTCConfigListener callback) |
protected java.lang.String |
GetRTCProfile() |
protected void |
GetRTCUserData(java.lang.String roomId,
int order,
NativeObject.RTCUserInfoListener listener) |
protected void |
GetRTCUsers(java.lang.String roomId,
int order,
NativeObject.RTCUserInfoListener listener) |
protected long |
GetSendTimeByMessageId(long messageId) |
protected java.lang.String |
GetTextMessageDraft(int conversationType,
java.lang.String targetId)
获取文字消息的草稿。
|
protected NativeObject.Message |
GetTheFirstUnreadMessage(int conversationType,
java.lang.String targetId) |
protected NativeObject.Conversation[] |
GetTopConversations(int[] conversationTypes) |
protected int |
GetTotalUnreadCount()
获取所有未读消息数。
|
protected int |
GetUnreadCount(java.lang.String targetId,
int conversationType) |
void |
GetUploadToken(int fileType,
java.lang.String fileName,
NativeObject.FileTokenListener callback) |
protected NativeObject.UserInfo |
GetUserInfoExSync(java.lang.String userId,
int categoryId) |
protected void |
GetUserStatus(java.lang.String userId,
NativeObject.CreateDiscussionCallback pushSettingListener) |
protected void |
GetVendorToken(java.lang.String name,
NativeObject.TokenListener callback) |
protected void |
GetVoIPKey(int engineType,
java.lang.String channelName,
java.lang.String extra,
NativeObject.TokenListener callback) |
protected void |
HangupRTCLiveInvitation(java.lang.String roomId,
java.lang.String peerRoomId,
java.lang.String sessionId,
java.lang.String content,
java.lang.String[] keys,
NativeObject.PublishAckListener callback) |
protected int |
InitClient(java.lang.String appid,
java.lang.String packageName,
java.lang.String deviceId,
java.lang.String dbPath,
java.lang.String sdkVersion)
初始化AppId
|
protected void |
InviteMemberToDiscussion(java.lang.String discussionId,
java.lang.String[] userIds,
NativeObject.PublishAckListener callback)
邀请用户加入讨论组。
|
protected void |
JoinChatRoom(java.lang.String targetId,
int categoryId,
int messageCount,
boolean flag,
NativeObject.PublishAckListener callback) |
protected void |
JoinExistingChatroom(java.lang.String targetId,
int categoryId,
int messageCount,
NativeObject.PublishAckListener callback,
boolean keepMsg) |
protected void |
JoinGroup(java.lang.String groupId,
java.lang.String groupName,
NativeObject.PublishAckListener callback)
加入群组。
|
protected void |
JoinRTCRoomAndGetData(java.lang.String roomId,
int roomType,
int broadcastType,
NativeObject.RTCUserInfoListener listener) |
protected void |
JoinRTCRoomAndGetData(java.lang.String roomId,
int roomType,
int broadcastType,
java.lang.String key,
java.lang.String value,
NativeObject.RTCUserInfoListener listener) |
protected NativeObject.AccountInfo[] |
LoadAccountInfo() |
protected void |
LoadHistoryMessage(java.lang.String targetId,
int categoryId,
long dataTime,
int count,
NativeObject.HistoryMessageListener callback) |
protected void |
LoadHistoryMessageOption(java.lang.String targetId,
int categoryId,
long dataTime,
int count,
int order,
boolean needDup,
NativeObject.HistoryMessageListener callback) |
protected void |
networkUnavailable() |
protected int |
ping() |
protected boolean |
QueryChatroomInfo(java.lang.String targetId,
int count,
int order,
NativeObject.ChatroomInfoListener callback) |
protected void |
QueryPushSetting(NativeObject.PushSettingListener callback) |
protected void |
QuitChatRoom(java.lang.String targetId,
int categoryId,
NativeObject.PublishAckListener callback) |
protected void |
QuitDiscussion(java.lang.String discussionId,
NativeObject.PublishAckListener callback)
退出自己所在的某讨论组。
|
protected void |
QuitGroup(java.lang.String groupId,
NativeObject.PublishAckListener callback)
退出群组。
|
protected void |
RecallMessage(java.lang.String objectName,
byte[] content,
NativeObject.PushConfig profile,
NativeObject.PublishAckListener callback,
boolean disableNotification) |
protected int |
RegisterCmdMsgType(java.lang.String[] msgObjectNames) |
protected int |
RegisterDeleteMessageType(java.lang.String[] msgObjectNames) |
protected int |
RegisterMessage(NativeObject.Conversation[] objectArray) |
protected int |
RegisterMessageType(java.lang.String objName,
int flag)
注册对象
|
protected boolean |
RemoveConversation(int conversationType,
java.lang.String targetId)
从会话列表中移除某一会话,但是不删除会话内的消息,如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。
|
protected boolean |
RemoveEncryptedConversation(java.lang.String targetId)
remove encrypted conversation
|
protected void |
RemoveFromBlacklist(java.lang.String userId,
NativeObject.PublishAckListener callback)
将个某用户从黑名单中移出
|
protected void |
RemoveMemberFromDiscussion(java.lang.String discussionId,
java.lang.String userId,
NativeObject.PublishAckListener callback)
供管理员将某用户移出讨论组,移出自己或者非讨论组创建者执行移出操作将产生错误。
|
protected boolean |
RemoveMemberFromDiscussionSync(java.lang.String discussionId,
java.lang.String userId) |
protected void |
RemovePushSetting(NativeObject.PublishAckListener callback) |
protected void |
RenameDiscussion(java.lang.String targetId,
java.lang.String discussionName,
NativeObject.PublishAckListener publishAckListener) |
protected void |
RTCDeleteInnerData(java.lang.String roomId,
int type,
java.lang.String[] keys,
java.lang.String objectName,
java.lang.String content,
NativeObject.PublishAckListener callback) |
protected void |
RTCDeleteOuterData(java.lang.String roomId,
int type,
java.lang.String[] keys,
java.lang.String objectName,
java.lang.String content,
NativeObject.PublishAckListener callback) |
protected void |
RTCGetInnerData(java.lang.String roomId,
int type,
java.lang.String[] keys,
NativeObject.RTCDataListener callback) |
protected void |
RTCGetOuterData(java.lang.String roomId,
int type,
java.lang.String[] keys,
NativeObject.RTCDataListener callback) |
protected void |
RTCGetToken(java.lang.String roomId,
int roomType,
int broadcastType,
NativeObject.TokenListener callback) |
protected void |
RTCGetUserData(java.lang.String roomId,
java.lang.String[] userIds,
NativeObject.RTCUserInfoListener callback) |
protected void |
RTCPutInnerDatum(java.lang.String roomId,
int type,
java.lang.String key,
java.lang.String value,
java.lang.String objectName,
java.lang.String content,
NativeObject.PublishAckListener callback) |
protected void |
RTCPutOuterDatum(java.lang.String roomId,
int type,
java.lang.String key,
java.lang.String value,
java.lang.String objectName,
java.lang.String content,
NativeObject.PublishAckListener callback) |
protected void |
RTCSetUserData(java.lang.String roomId,
int type,
java.util.Map<java.lang.String,java.lang.String> data,
java.lang.String objectName,
java.lang.String content,
NativeObject.PublishAckListener callback) |
protected void |
RTCSetUserResource(java.lang.String roomId,
NativeObject.StatusData[] kv,
java.lang.String objectName,
NativeObject.StatusData[] content,
NativeObject.PublishAckListener callback) |
protected void |
RTCSetUserState(java.lang.String roomId,
java.lang.String state,
NativeObject.PublishAckListener callback) |
protected long |
SaveMessage(java.lang.String targetId,
int category,
java.lang.String objectName,
java.lang.String senderUserId,
byte[] content,
boolean direction,
int readStatus,
int sendStatus,
long timeMillis,
java.lang.String searchableWord,
int markUnread,
java.lang.String msgUid,
boolean disableNotification,
boolean supportExtension,
java.lang.String extMsg) |
protected void |
sdkBackgroundChanged(boolean isInBackground) |
protected void |
SearchAccount(java.lang.String keyWords,
int businessType,
int searchType,
NativeObject.AccountInfoListener callback) |
protected NativeObject.Conversation[] |
SearchConversations(java.lang.String keyword,
int[] types,
java.lang.String[] objName) |
protected NativeObject.Message[] |
SearchMessages(java.lang.String targetId,
int categoryId,
java.lang.String keyword,
int count,
long timestamp) |
protected NativeObject.Message[] |
SearchMessagesByUser(java.lang.String targetId,
int categoryId,
java.lang.String userId,
int count,
long timestamp) |
protected void |
SendMessage(java.lang.String targetId,
int categoryId,
int transferType,
java.lang.String objectName,
byte[] message,
NativeObject.PushConfig profile,
long messageId,
java.lang.String[] userIds,
NativeObject.PublishAckListener callback,
boolean mention,
boolean disableNotification,
boolean supportExtension,
java.lang.String extMsg)
发送消息
|
protected void |
sendMessageWithOption(java.lang.String targetId,
int categoryId,
int transferType,
java.lang.String objectName,
byte[] message,
NativeObject.PushConfig profile,
long messageId,
java.lang.String[] userIds,
NativeObject.PublishAckListener callback,
boolean mention,
boolean isVoIPPush,
boolean isFilterBlackList,
boolean disableNotification,
boolean supportExtension,
java.lang.String extMsg)
发送消息
|
protected void |
SendRTCHeartbeat(java.lang.String[] roomId) |
protected void |
SendRTCLiveInvitation(java.lang.String roomId,
java.lang.String anchorId,
java.lang.String peerRoomId,
java.lang.String inviteInfo,
java.lang.String sessionId,
int timeout,
NativeObject.PublishAckListener callback) |
protected void |
SendRTCPing(java.lang.String roomId,
NativeObject.PublishAckListener callback) |
protected void |
SetBlockPush(java.lang.String targetId,
int categoryId,
boolean block,
NativeObject.PublishAckListener callback) |
protected void |
SetChatRoomStatus(java.lang.String roomId,
NativeObject.StatusData statusData,
NativeObject.StatusNotification statusNotification,
NativeObject.PublishAckListener callback) |
protected void |
SetChatRoomStatusNotificationListener(NativeObject.StatusNotificationListener listener) |
protected void |
SetConnectionStatusListener(NativeObject.ConnectionStatusListener listener) |
protected void |
SetConversationStatusListener(NativeObject.ConversationStatusListener listener) |
protected int |
SetDeviceInfo(java.lang.String manufacturer,
java.lang.String model,
java.lang.String osVersion,
java.lang.String netWork,
java.lang.String netWorkOperator) |
protected boolean |
SetEncryptedConversationInfo(java.lang.String targetId,
java.lang.String encTargetId,
java.lang.String encRemoteId,
java.lang.String encKey,
java.lang.String encXa,
int encStatus)
set encrypted conversation info
|
protected int |
SetEnvironment(boolean isPrivate) |
protected boolean |
SetExtraMessageAttribute(java.lang.String targetId,
int type,
java.lang.String msgUId,
java.lang.String extMsg) |
protected void |
SetGetSearchableWordListener(NativeObject.GetSearchableWordListener listener) |
protected void |
SetInviteStatus(java.lang.String targetId,
int status,
NativeObject.PublishAckListener callback) |
protected boolean |
SetIsTop(int conversationType,
java.lang.String targetId,
boolean isTop,
boolean needCreate)
设置某一会话为置顶或者取消置顶。
|
protected void |
SetLogStatus(int level,
NativeObject.NativeLogInfoListener listener) |
protected boolean |
SetMessageContent(long messageId,
byte[] content,
java.lang.String objectName)
修改数据库消息内容。
|
protected boolean |
SetMessageExtra(long messageId,
java.lang.String value)
设置消息的附加信息,此信息只保存在本地,如:设置语音消息的已读未读状态。
|
protected void |
SetMessageListener(NativeObject.ReceiveMessageListener listener) |
protected void |
SetOfflineMessageDuration(java.lang.String duration,
io.rong.imlib.NativeObject.SetOfflineMessageDurationListener listener) |
protected void |
SetPushNotificationListener(NativeClient.PushNotificationListener listener) |
protected void |
SetPushSetting(int key,
java.lang.String value,
NativeObject.SetPushSettingListener setPushSettingListener) |
protected boolean |
SetReadStatus(long messageId,
int status) |
protected boolean |
SetReadTime(long messageId,
long timestamp)
Set the read time of a message.
|
protected void |
SetRealTimeLogListener(IRealTimeLogListener listener) |
protected void |
SetRTCHeartbeatListener(NativeObject.RTCHeartbeatListener listener) |
protected boolean |
SetSendStatus(long messageId,
int status) |
protected void |
SetSubscribeStatusListener(NativeObject.UserStatusListener listener) |
protected boolean |
SetTextMessageDraft(int conversationType,
java.lang.String targetId,
java.lang.String content)
保存文字消息的草稿。
|
protected void |
SetUserData(java.lang.String ext,
NativeObject.PublishAckListener callback) |
protected void |
SetUserStatus(int status,
NativeObject.PublishAckListener callback) |
protected void |
SubscribeAccount(java.lang.String targetId,
int categoryId,
boolean subscribe,
NativeObject.PublishAckListener callback) |
protected void |
SubscribeStatus(java.lang.String[] userIds,
NativeObject.PublishAckListener listener) |
protected void |
SyncGroups(java.lang.String[] groupIds,
java.lang.String[] groupNames,
NativeObject.PublishAckListener callback)
同步群组信息。
|
protected boolean |
UpdateConversationInfo(java.lang.String targetId,
int categoryId,
java.lang.String title,
java.lang.String portraitUrl) |
protected boolean |
UpdateMessageReceiptStatus(java.lang.String targetId,
int categoryId,
long timestamp) |
protected boolean |
UpdateReadReceiptRequestInfo(java.lang.String msgUId,
java.lang.String info) |
protected boolean |
UseRTCOnly() |
protected int InitClient(java.lang.String appid, java.lang.String packageName, java.lang.String deviceId, java.lang.String dbPath, java.lang.String sdkVersion)
appid
- protected int RegisterMessageType(java.lang.String objName, int flag)
objName
- 对象名称flag
- 是否持久化数据protected int RegisterMessage(NativeObject.Conversation[] objectArray)
protected int Connect(java.lang.String token, NativeObject.ConnectionEntry[] connectionEntities, java.lang.String userId, NativeObject.UserProfile userProfile)
token
- callback
- protected void SetConnectionStatusListener(NativeObject.ConnectionStatusListener listener)
protected void Disconnect(int state, boolean isCloseDB)
state
- 是否接受推送,接受推送时为 2; 否则为 4。isCloseDB
- 是否关闭数据库protected boolean DeleteMessages(long[] idList)
idList
- 要删除的消息 Id 列表protected void DeleteRemoteMessages(int conversationType, java.lang.String targetId, NativeObject.Message[] messageList, boolean isDeleteLocal, NativeObject.PublishAckListener callback)
conversationType
- 会话类型targetId
- 会话 IdmessageList
- 要删除的消息列表callback
- 删除指定消息的回调protected boolean ClearMessages(int conversationType, java.lang.String targetId, boolean clearDB)
conversationType
- 会话类型targetId
- 会话 IdclearDB
- 是否整理数据库,清理空间。protected void CleanRemoteHistoryMessage(int conversationType, java.lang.String targetId, long recordTime, NativeObject.PublishAckListener callback)
conversationType
- 会话类型targetId
- 目标会话IdrecordTime
- 清除消息截止时间戳,【0 ~ 当前时间的 Unix 时间戳】callback
- 清除消息的回调protected boolean CleanHistoryMessages(int conversationType, java.lang.String targetId, long recordTime)
conversationType
- 会话类型targetId
- 目标会话IdrecordTime
- 清除消息截止时间戳,【0 ~ 当前时间的 Unix 时间戳】protected boolean ClearUnread(int conversationType, java.lang.String targetId)
conversationType
- 会话类型targetId
- 会话 Idprotected boolean SetMessageExtra(long messageId, java.lang.String value)
messageId
- 消息 Idvalue
- 消息附加信息,最大 1024 字节protected boolean RemoveConversation(int conversationType, java.lang.String targetId)
conversationType
- 会话类型targetId
- 会话 Idprotected boolean SetTextMessageDraft(int conversationType, java.lang.String targetId, java.lang.String content)
conversationType
- 会话类型targetId
- 会话 Idcontent
- 草稿的文字内容protected boolean SetMessageContent(long messageId, byte[] content, java.lang.String objectName)
messageId
- 消息 idcontent
- 消息 json 内容objectName
- 消息名称protected java.lang.String GetTextMessageDraft(int conversationType, java.lang.String targetId)
conversationType
- 会话类型targetId
- 会话 Idprotected boolean SetIsTop(int conversationType, java.lang.String targetId, boolean isTop, boolean needCreate)
conversationType
- 会话类型targetId
- 会话 IdisTop
- needCreate
- 会话不存在时,是否创建会话。protected int GetTotalUnreadCount()
protected long GetDeltaTime()
protected void CreateInviteDiscussion(java.lang.String name, java.lang.String[] userIds, NativeObject.CreateDiscussionCallback callback)
name
- 讨论组名称。如当前所有成员的名字的组合userIds
- 邀请的用户 Id 列表callback
- 创建讨论组成功后的回调protected void InviteMemberToDiscussion(java.lang.String discussionId, java.lang.String[] userIds, NativeObject.PublishAckListener callback)
discussionId
- 讨论组 IduserIds
- 邀请的用户 Id 列表callback
- 操作回调protected void RemoveMemberFromDiscussion(java.lang.String discussionId, java.lang.String userId, NativeObject.PublishAckListener callback)
discussionId
- 讨论组 IduserId
- 用户 Idcallback
- 操作回调protected boolean RemoveMemberFromDiscussionSync(java.lang.String discussionId, java.lang.String userId)
protected void QuitDiscussion(java.lang.String discussionId, NativeObject.PublishAckListener callback)
discussionId
- 讨论组 Idcallback
- 操作回调protected long SaveMessage(java.lang.String targetId, int category, java.lang.String objectName, java.lang.String senderUserId, byte[] content, boolean direction, int readStatus, int sendStatus, long timeMillis, java.lang.String searchableWord, int markUnread, java.lang.String msgUid, boolean disableNotification, boolean supportExtension, java.lang.String extMsg)
protected void SendMessage(java.lang.String targetId, int categoryId, int transferType, java.lang.String objectName, byte[] message, NativeObject.PushConfig profile, long messageId, java.lang.String[] userIds, NativeObject.PublishAckListener callback, boolean mention, boolean disableNotification, boolean supportExtension, java.lang.String extMsg)
targetId
- 目标 IDcategoryId
- 会话类型transferType
- 对应 1,2,3 三个值。 1 代表状态类消息,接收方离线时不会再接受到该消息,也就是不会按离线消息处理。
2 代表仅有本地通知没有推送能力,即使设置了 pushContent, 仍然不会推送。
3 代表该消息具备推送的能力,即如果为内置内容类消息,会有推送,其它消息,如果设置了 pushContent, 也会推送。objectName
- 消息类型message
- 消息内容push
- 推送内容pushData
- 推送携带的数据messageId
- 消息 IDuserIds
- 接受用户 ID 数组callback
- 发送消息的回调mention
- 是否是 @ 消息protected void sendMessageWithOption(java.lang.String targetId, int categoryId, int transferType, java.lang.String objectName, byte[] message, NativeObject.PushConfig profile, long messageId, java.lang.String[] userIds, NativeObject.PublishAckListener callback, boolean mention, boolean isVoIPPush, boolean isFilterBlackList, boolean disableNotification, boolean supportExtension, java.lang.String extMsg)
targetId
- message
- callback
- isVoIPPush
- 是否支持VoIP推送isFilterBlackList
- 是否过滤黑名单protected NativeObject.UserInfo GetUserInfoExSync(java.lang.String userId, int categoryId)
protected void SetMessageListener(NativeObject.ReceiveMessageListener listener)
protected boolean SetReadStatus(long messageId, int status)
protected boolean SetSendStatus(long messageId, int status)
protected int EnvironmentChangeNotify(int type)
protected void GetDiscussionInfo(java.lang.String discussionId, NativeObject.DiscussionInfoListener callback)
protected NativeObject.DiscussionInfo GetDiscussionInfoSync(java.lang.String discussionId)
protected void RenameDiscussion(java.lang.String targetId, java.lang.String discussionName, NativeObject.PublishAckListener publishAckListener)
protected NativeObject.Conversation GetConversationEx(java.lang.String targetId, int conversationType)
protected void SetBlockPush(java.lang.String targetId, int categoryId, boolean block, NativeObject.PublishAckListener callback)
protected int GetBlockPush(java.lang.String targetId, int categoryId)
protected void SetInviteStatus(java.lang.String targetId, int status, NativeObject.PublishAckListener callback)
protected int GetDNDUnreadCount(NativeObject.Conversation[] conversations)
conversations
- protected int GetUnreadCount(java.lang.String targetId, int conversationType)
protected int GetMessageCount(java.lang.String targetId, int conversationType)
protected void RecallMessage(java.lang.String objectName, byte[] content, NativeObject.PushConfig profile, NativeObject.PublishAckListener callback, boolean disableNotification)
protected NativeObject.Conversation[] GetConversationListEx(int[] conversationTypes)
protected NativeObject.Conversation[] GetConversationList(int[] conversationTypes, long timeStamp, int count)
protected void SyncGroups(java.lang.String[] groupIds, java.lang.String[] groupNames, NativeObject.PublishAckListener callback)
groupIds
- 自己所加入群组 Id 列表groupNames
- 自己所加入群组 Name 列表callback
- 操作回调protected void JoinGroup(java.lang.String groupId, java.lang.String groupName, NativeObject.PublishAckListener callback)
groupId
- 加入群组 IdgroupName
- 加入群组 Namecallback
- 操作回调protected void QuitGroup(java.lang.String groupId, NativeObject.PublishAckListener callback)
groupId
- 退出群组 Idcallback
- 操作回调protected int GetCateUnreadCount(int[] conversationTypes, boolean withDND)
conversationTypes
- protected void JoinChatRoom(java.lang.String targetId, int categoryId, int messageCount, boolean flag, NativeObject.PublishAckListener callback)
protected void JoinExistingChatroom(java.lang.String targetId, int categoryId, int messageCount, NativeObject.PublishAckListener callback, boolean keepMsg)
protected void QuitChatRoom(java.lang.String targetId, int categoryId, NativeObject.PublishAckListener callback)
protected boolean ClearConversations(int[] conversationTypes)
conversationTypes
- 会话类型protected void AddToBlacklist(java.lang.String userId, NativeObject.PublishAckListener callback)
userId
- 用户 Idcallback
- protected void RemoveFromBlacklist(java.lang.String userId, NativeObject.PublishAckListener callback)
userId
- 用户 Idcallback
- protected void GetBlacklistStatus(java.lang.String userId, NativeObject.BizAckListener callback)
userId
- 用户 Idcallback
- protected void GetBlacklist(NativeObject.SetBlacklistListener callback)
callback
- public void GetUploadToken(int fileType, java.lang.String fileName, NativeObject.FileTokenListener callback)
public void GetDownloadUrl(int fileType, java.lang.String mimeKey, java.lang.String fileName, NativeObject.TokenListener callback, boolean is_oss)
protected void SubscribeAccount(java.lang.String targetId, int categoryId, boolean subscribe, NativeObject.PublishAckListener callback)
protected int SetDeviceInfo(java.lang.String manufacturer, java.lang.String model, java.lang.String osVersion, java.lang.String netWork, java.lang.String netWorkOperator)
protected void SearchAccount(java.lang.String keyWords, int businessType, int searchType, NativeObject.AccountInfoListener callback)
protected void LoadHistoryMessage(java.lang.String targetId, int categoryId, long dataTime, int count, NativeObject.HistoryMessageListener callback)
protected void LoadHistoryMessageOption(java.lang.String targetId, int categoryId, long dataTime, int count, int order, boolean needDup, NativeObject.HistoryMessageListener callback)
protected void GetChatroomHistoryMessage(java.lang.String targetId, long dataTime, int count, int order, NativeObject.HistoryMessageListener callback)
protected int ping()
protected void networkUnavailable()
protected void sdkBackgroundChanged(boolean isInBackground)
protected NativeObject.AccountInfo[] LoadAccountInfo()
protected void AddPushSetting(java.lang.String startTime, int spanMins, NativeObject.PublishAckListener callback)
callback
- protected void RemovePushSetting(NativeObject.PublishAckListener callback)
protected void QueryPushSetting(NativeObject.PushSettingListener callback)
protected void SetUserData(java.lang.String ext, NativeObject.PublishAckListener callback)
protected NativeObject.Message[] GetHistoryMessagesEx(java.lang.String targetId, int category, java.lang.String clazzName, long lastId, int count, boolean flag)
category
- 会话类型targetId
- 会话 IdclazzName
- 消息类别lastId
- 最后一条消息的 Id,获取此消息之前的 count 条消息count
- 要获取的消息数量flag
- 标志,true:从当前消息向前, false:向后查询protected NativeObject.Message[] GetHistoryMessagesByObjectNames(java.lang.String targetId, int category, java.lang.String[] clazzNames, long timestamp, int count, boolean flag)
category
- 会话类型targetId
- 会话 IdclazzNames
- 消息类别ListlastId
- 最后一条消息的 Id,获取此消息之前的 count 条消息count
- 要获取的消息数量flag
- 标志,true:从当前消息向前, false:向后查询protected long GetSendTimeByMessageId(long messageId)
protected NativeObject.Message GetMessageById(long messageId)
protected NativeObject.Message GetMessageByUId(java.lang.String messageUId)
protected boolean UpdateMessageReceiptStatus(java.lang.String targetId, int categoryId, long timestamp)
protected boolean ClearUnreadByReceipt(java.lang.String targetId, int categoryId, long timestamp)
protected boolean UpdateConversationInfo(java.lang.String targetId, int categoryId, java.lang.String title, java.lang.String portraitUrl)
protected boolean QueryChatroomInfo(java.lang.String targetId, int count, int order, NativeObject.ChatroomInfoListener callback)
protected void GetVoIPKey(int engineType, java.lang.String channelName, java.lang.String extra, NativeObject.TokenListener callback)
protected void SetGetSearchableWordListener(NativeObject.GetSearchableWordListener listener)
protected void SetUserStatus(int status, NativeObject.PublishAckListener callback)
protected void GetUserStatus(java.lang.String userId, NativeObject.CreateDiscussionCallback pushSettingListener)
protected void SetPushSetting(int key, java.lang.String value, NativeObject.SetPushSettingListener setPushSettingListener)
protected void SubscribeStatus(java.lang.String[] userIds, NativeObject.PublishAckListener listener)
protected void SetSubscribeStatusListener(NativeObject.UserStatusListener listener)
protected java.lang.String GetPushSetting(int key)
protected NativeObject.Message[] SearchMessages(java.lang.String targetId, int categoryId, java.lang.String keyword, int count, long timestamp)
protected NativeObject.Message[] SearchMessagesByUser(java.lang.String targetId, int categoryId, java.lang.String userId, int count, long timestamp)
protected NativeObject.Conversation[] SearchConversations(java.lang.String keyword, int[] types, java.lang.String[] objName)
protected NativeObject.Message[] GetMatchedMessages(java.lang.String targetId, int categoryId, long timestamp, int before, int after)
protected void GetVendorToken(java.lang.String name, NativeObject.TokenListener callback)
protected NativeObject.Message[] GetMentionMessages(java.lang.String targetId, int categoryId)
targetId
- 会话 IdcategoryId
- 会话类型protected void SetLogStatus(int level, NativeObject.NativeLogInfoListener listener)
protected boolean UpdateReadReceiptRequestInfo(java.lang.String msgUId, java.lang.String info)
protected int RegisterCmdMsgType(java.lang.String[] msgObjectNames)
protected int RegisterDeleteMessageType(java.lang.String[] msgObjectNames)
protected int SetEnvironment(boolean isPrivate)
protected void SetOfflineMessageDuration(java.lang.String duration, io.rong.imlib.NativeObject.SetOfflineMessageDurationListener listener)
protected java.lang.String GetOfflineMessageDuration()
protected NativeObject.Conversation[] GetBlockedConversations(int[] conversationTypes)
protected NativeObject.Message GetTheFirstUnreadMessage(int conversationType, java.lang.String targetId)
protected NativeObject.Conversation[] GetTopConversations(int[] conversationTypes)
protected boolean SetReadTime(long messageId, long timestamp)
messageId
- The id of message.timestamp
- Read time.protected boolean CreateEncryptedConversation(java.lang.String targetId, java.lang.String encTargetId, java.lang.String encRemoteId, java.lang.String encKey, java.lang.String encXa, int encStatus)
targetId
- targetId the id of conversationprotected RCEncryptedSession GetEncryptedConversationInfo(java.lang.String targetId)
targetId
- the id of conversationprotected boolean SetEncryptedConversationInfo(java.lang.String targetId, java.lang.String encTargetId, java.lang.String encRemoteId, java.lang.String encKey, java.lang.String encXa, int encStatus)
targetId
- the id of conversationprotected boolean RemoveEncryptedConversation(java.lang.String targetId)
targetId
- the id of conversationprotected boolean ClearEncryptedConversations()
protected java.util.List<RCEncryptedSession> GetEncryptedConversations()
protected void SetPushNotificationListener(NativeClient.PushNotificationListener listener)
protected void SetRealTimeLogListener(IRealTimeLogListener listener)
protected void ExitRTCRoom(java.lang.String roomId, NativeObject.PublishAckListener callback)
protected void GetRTCUsers(java.lang.String roomId, int order, NativeObject.RTCUserInfoListener listener)
protected void GetRTCUserData(java.lang.String roomId, int order, NativeObject.RTCUserInfoListener listener)
protected void SendRTCPing(java.lang.String roomId, NativeObject.PublishAckListener callback)
protected boolean UseRTCOnly()
protected void RTCPutInnerDatum(java.lang.String roomId, int type, java.lang.String key, java.lang.String value, java.lang.String objectName, java.lang.String content, NativeObject.PublishAckListener callback)
protected void RTCPutOuterDatum(java.lang.String roomId, int type, java.lang.String key, java.lang.String value, java.lang.String objectName, java.lang.String content, NativeObject.PublishAckListener callback)
protected void RTCDeleteInnerData(java.lang.String roomId, int type, java.lang.String[] keys, java.lang.String objectName, java.lang.String content, NativeObject.PublishAckListener callback)
protected void RTCDeleteOuterData(java.lang.String roomId, int type, java.lang.String[] keys, java.lang.String objectName, java.lang.String content, NativeObject.PublishAckListener callback)
protected void RTCGetInnerData(java.lang.String roomId, int type, java.lang.String[] keys, NativeObject.RTCDataListener callback)
protected void RTCGetOuterData(java.lang.String roomId, int type, java.lang.String[] keys, NativeObject.RTCDataListener callback)
protected void JoinRTCRoomAndGetData(java.lang.String roomId, int roomType, int broadcastType, NativeObject.RTCUserInfoListener listener)
protected void GetRTCConfig(java.lang.String model, java.lang.String OSVersion, long timestamp, java.lang.String sdkVersion, NativeObject.RTCConfigListener callback)
protected void RTCGetToken(java.lang.String roomId, int roomType, int broadcastType, NativeObject.TokenListener callback)
protected void RTCSetUserState(java.lang.String roomId, java.lang.String state, NativeObject.PublishAckListener callback)
protected java.lang.String GetHttpDnsSecret()
protected java.lang.String GetHttpDnsAccountId()
protected void RTCSetUserData(java.lang.String roomId, int type, java.util.Map<java.lang.String,java.lang.String> data, java.lang.String objectName, java.lang.String content, NativeObject.PublishAckListener callback)
protected void RTCGetUserData(java.lang.String roomId, java.lang.String[] userIds, NativeObject.RTCUserInfoListener callback)
protected void SetChatRoomStatus(java.lang.String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
protected void DeleteChatRoomStatus(java.lang.String roomId, NativeObject.StatusData statusData, NativeObject.StatusNotification statusNotification, NativeObject.PublishAckListener callback)
protected java.lang.String GetChatRoomStatusByKey(java.lang.String roomId, java.lang.String key)
protected java.util.HashMap<java.lang.String,java.lang.String> GetChatRoomStatus(java.lang.String roomId)
protected void SetChatRoomStatusNotificationListener(NativeObject.StatusNotificationListener listener)
protected void RTCSetUserResource(java.lang.String roomId, NativeObject.StatusData[] kv, java.lang.String objectName, NativeObject.StatusData[] content, NativeObject.PublishAckListener callback)
protected void SetConversationStatusListener(NativeObject.ConversationStatusListener listener)
protected java.lang.String GetRTCProfile()
protected boolean SetExtraMessageAttribute(java.lang.String targetId, int type, java.lang.String msgUId, java.lang.String extMsg)
protected void SendRTCHeartbeat(java.lang.String[] roomId)
protected void SetRTCHeartbeatListener(NativeObject.RTCHeartbeatListener listener)
protected void JoinRTCRoomAndGetData(java.lang.String roomId, int roomType, int broadcastType, java.lang.String key, java.lang.String value, NativeObject.RTCUserInfoListener listener)
protected void SendRTCLiveInvitation(java.lang.String roomId, java.lang.String anchorId, java.lang.String peerRoomId, java.lang.String inviteInfo, java.lang.String sessionId, int timeout, NativeObject.PublishAckListener callback)
protected void CancelRTCLiveInvitation(java.lang.String roomId, java.lang.String anchorId, java.lang.String peerRoomId, java.lang.String inviteInfo, java.lang.String sessionId, NativeObject.PublishAckListener callback)
protected void AnswerRTCLiveInvitation(java.lang.String roomId, int answer, java.lang.String anchorId, java.lang.String peerRoomId, java.lang.String sessionId, java.lang.String content, java.lang.String key, java.lang.String value, NativeObject.PublishAckListener callback)
protected void HangupRTCLiveInvitation(java.lang.String roomId, java.lang.String peerRoomId, java.lang.String sessionId, java.lang.String content, java.lang.String[] keys, NativeObject.PublishAckListener callback)