Class RongCoreClient
- 
                    
                    - All Implemented Interfaces:
 
 public abstract class RongCoreClient获取会话中未读的 @消息。- Since:
- 5.2.5 
 
- 
                
                    
                    - 
                                
                            
                                Constructor SummaryConstructors Constructor Description RongCoreClient()
 - 
                                
                            
                                Method SummaryModifier and Type Method Description static RongCoreClientgetInstance()static voidinit(Context context)Initializes the SDK. static voidinit(Context context, String appKey)Initializes the SDK. static voidinit(Context context, String appKey, boolean enablePush)Initializes the SDK. static voidinit(Context context, String appKey, boolean enablePush, Boolean isMainProcess)Initializes the SDK. static voidinit(Context context, String appKey, InitOption option)Initializes the SDK. static RongCoreClientconnect(String token, IRongCoreCallback.ConnectCallback connectCallback)Connects to the RCserver. static RongCoreClientconnect(String token, int timeLimit, IRongCoreCallback.ConnectCallback connectCallback)Retrieves an instance of the IMLib interface class. static StringgetVersion()static StringgetCommitId()Retrieves the SDK commit pointer static booleanaddConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener)Adds a listener for connection status changes. static voidsetConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener)Sets a listener for connection status changes. static booleanremoveConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener)Remove the listener for connection status changes. abstract voidaddDatabaseStatusListener(IRongCoreListener.DatabaseUpgradeStatusListener listener)Sets the database upgrade status listener abstract voidremoveDatabaseStatusListener(IRongCoreListener.DatabaseUpgradeStatusListener listener)Removes the database upgrade status listener static booleanaddOnReceiveMessageListener(OnReceiveMessageWrapperListener listener)Adds a listener for the message received event. static voidsetOnReceiveMessageListener(IRongCoreListener.OnReceiveMessageListener listener)Sets the listener for receiving message events. static booleanremoveOnReceiveMessageListener(OnReceiveMessageWrapperListener listener)Removes the listener for message received events. static voidsetServerInfo(String naviServer, String fileServer)Sets the navigation server and media server addresses for private deployment. static voidsetStatisticDomain(String domain)Configures the data upload URL (optional). static voidregisterMessageType(Class<out MessageContent> messageContentClass)Register custom message types Call this method after initialization and before connecting to register custom messages. static voidregisterMessageType(List<Class<out MessageContent>> messageContentClassList)Batch register custom message types Call this method to register custom messages after initialization and before connecting. static voidsetOnRecallMessageListener(IRongCoreListener.OnRecallMessageListener listener)Sets the message recall listener static voidsetTypingStatusListener(IRongCoreListener.TypingStatusListener listener)Sets the typing status listener. static voidsetReadReceiptListener(IRongCoreListener.ReadReceiptListener listener)Sets the message receipt listener. static voidsetRCLogInfoListener(IRongCoreListener.RCLogInfoListener listener)Sets the log output listener. abstract voidaddConversationsToTag(String tagId, List<ConversationIdentifier> conversationIdentifierList, IRongCoreCallback.OperationCallback callback)Adds a conversation to a tag abstract voidaddTag(TagInfo tagInfo, IRongCoreCallback.OperationCallback callback)Create a tag abstract voidappOnStart()Notifies the SDK that the application has returned to the foreground. abstract voidbatchInsertMessage(List<Message> messages, IRongCoreCallback.ResultCallback<Boolean> callback)Batch inserts received messages (these messages are only inserted into the local database and are not actually sent to the server or the other party). abstract voidbatchInsertMessage(List<Message> messages, boolean enableCheck, IRongCoreCallback.ResultCallback<Boolean> callback)Batch inserts received messages (these messages are only inserted into the local database and will not be sent to the server or the other party). abstract voidbeginDestructMessage(Message message, IRongCoreListener.DestructCountDownTimerListener pListener)Starts burning the message, only supported in one-to-one chat. abstract voidcancelDownloadMediaMessage(Message message, IRongCoreCallback.OperationCallback callback)Cancels the download of a multimedia message. abstract voidgetPrivateDownloadToken(String fileName, IRongCoreCallback.ResultCallback<String> callback)This interface is only applicable for private cloud SDK calls. abstract voidgetMediaUploadAuthorInfo(String fileName, String url, IRongCoreCallback.ResultCallback<MediaUploadAuthorInfo> callback)Retrieves the private cloud token for multimedia download. abstract voidcancelSDKHeartBeat()Cancels the wakelock heartbeat. abstract voidcancelSendMediaMessage(Message message, IRongCoreCallback.OperationCallback callback)Cancels the sending of a multimedia file. abstract voidcleanHistoryMessages(ConversationType conversationType, String targetId, long recordTime, boolean cleanRemote, IRongCoreCallback.OperationCallback callback)Deletes messages before the specified timestamp, with the option to also delete messages on the server. abstract voidcleanRemoteHistoryMessages(ConversationType conversationType, String targetId, long recordTime, IRongCoreCallback.OperationCallback callback)Clears historical messages stored on the server. abstract voidclearConversations(IRongCoreCallback.ResultCallback<Boolean> callback, Array<ConversationType> conversationTypes)Clears all conversations and conversation messages of the specified conversation types from the list. abstract voidclearConversationsByTag(String tagId, boolean deleteMessage, IRongCoreCallback.ResultCallback<Boolean> callback)Deletes all conversations under the specified tag. abstract voidclearMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback)Deletes all messages in a specific conversation. abstract voidclearMessagesUnreadStatus(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback)Clears the unread message count for a specific conversation. abstract voidclearMessagesUnreadStatus(ConversationType conversationType, String targetId, long timestamp, IRongCoreCallback.OperationCallback callback)Clears the unread message count for a specific conversation. abstract voidclearMessagesUnreadStatusByTag(String tagId, IRongCoreCallback.ResultCallback<Boolean> callback)Clears the unread message count for all conversations under the specified tag. abstract voidclearTextMessageDraft(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback)Deletes the draft information in the specified conversation. abstract voiddeleteMessages(Array<int> messageIds, IRongCoreCallback.ResultCallback<Boolean> callback)Deletes messages. abstract voiddeleteMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback)Deletes all messages in a specific conversation. abstract voiddeleteRemoteMessages(ConversationType conversationType, String targetId, Array<Message> messages, IRongCoreCallback.OperationCallback callback)Batch deletes specified remote messages in a conversation (and deletes the corresponding local messages). abstract voiddisconnect()Disconnects from the RCserver while still receiving remote notifications. abstract voiddisconnect(boolean isReceivePush)Disconnects from the RCserver and determines whether to continue receiving remote push notifications based on the parameter. abstract voidlogout()Disconnects from the RCserver and stops receiving remote push notifications. abstract voiddownloadMedia(ConversationType conversationType, String targetId, IRongCoreEnum.MediaType mediaType, String imageUrl, IRongCoreCallback.DownloadMediaCallback callback)Downloads multimedia files. abstract voiddownloadMediaMessage(Message message, IRongCoreCallback.IDownloadMediaMessageCallback callback)Download multimedia files. abstract voiddownloadMediaFile(String fileUniqueId, String fileUrl, String fileName, String path, IRongCoreCallback.IDownloadMediaFileCallback callback)Download a file. abstract voidgetBlacklist(IRongCoreCallback.GetBlacklistCallback callback)Retrieves the blocklist of the current user. abstract voidgetBlacklistStatus(String userId, IRongCoreCallback.ResultCallback<IRongCoreEnum.BlacklistStatus> callback)Checks whether a user is in the blocklist. abstract voidgetBlockedConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes)Retrieves the list of conversations with Do Not Disturb enabled. abstract voidgetConversation(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Conversation> callback)Retrieves information for a single conversation. abstract voidgetConversations(List<ConversationIdentifier> conversationIdentifiers, IRongCoreCallback.ResultCallback<List<Conversation>> callback)Method to retrieve a list of conversations. abstract voidgetConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback)Retrieves the local conversation list of the current user. abstract voidgetConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes)Retrieves the local conversation list of the current user based on the conversation type. abstract voidgetTopConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes)Retrieves the list of pinned conversations based on the conversation type. abstract voidgetUnreadConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes)Retrieves the list of unread local conversations for the current user based on the conversation type. abstract voidgetConversationListByPage(IRongCoreCallback.ResultCallback<List<Conversation>> callback, long timeStamp, int count, Array<ConversationType> conversationTypes)Retrieves the conversation list in a paginated manner. abstract voidgetConversationListByPage(IRongCoreCallback.ResultCallback<List<Conversation>> callback, long timeStamp, int count, boolean topPriority, Array<ConversationType> conversationTypes)Fetches the conversation list with pagination. abstract voidgetConversationNotificationStatus(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<ConversationNotificationStatus> callback)Retrieves the message notification status for a conversation. abstract voidsetConversationNotificationStatus(ConversationType conversationType, String targetId, ConversationNotificationStatus notificationStatus, IRongCoreCallback.ResultCallback<ConversationNotificationStatus> callback)Sets the message notification status for a conversation. abstract voidgetConversationsFromTagByPage(String tagId, long ts, int count, IRongCoreCallback.ResultCallback<List<Conversation>> callback)Paginate and retrieve the conversation list under a specified local tag. abstract voidgetConversationTopStatus(String targetId, ConversationType conversationType, IRongCoreCallback.ResultCallback<Boolean> callback)Retrieves the pinned status of a conversation. abstract voidgetUnreadCount(String targetId, ConversationType conversationType, Array<String> objectNames, IRongCoreCallback.ResultCallback<Integer> callback)Retrieves the count of unread messages of the specified message types in the specified conversation (excluding chatroom conversations). abstract voidgetConversationTopStatusInTag(ConversationIdentifier conversationIdentifier, String tagId, IRongCoreCallback.ResultCallback<Boolean> callback)Retrieves the pinned status of a tag in a specified conversation (not supported for ultra groups) abstract IRongCoreListener.ConnectionStatusListener.ConnectionStatusgetCurrentConnectionStatus()Retrieves the current connection status of the IM service. abstract StringgetCurrentUserId()Retrieve the information of the currently connected user. abstract longgetDeltaTime()Gets the time difference between local time and server time. abstract voidgetDownloadInfo(String tag, IRongCoreCallback.ResultCallback<DownloadInfo> callback)Retrieves media file download information. abstract intgetGIFLimitSize()Gets the maximum allowed size for sending GIF images. abstract voidgetHistoryMessages(ConversationType conversationType, String targetId, int oldestMessageId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves the latest message entities of the specified message type, before the specified message, and in the specified quantity from the conversation. abstract voidgetHistoryMessages(ConversationType conversationType, String targetId, List<String> objectNames, long timestamp, int count, RongCommonDefine.GetMessageDirection direction, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves a list of messages in the conversation that meet the specified criteria. abstract voidgetHistoryMessages(ConversationType conversationType, String targetId, String objectName, int baseMessageId, int count, RongCommonDefine.GetMessageDirection direction, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves a list of messages that meet the specified criteria in the conversation. abstract voidgetHistoryMessages(ConversationType conversationType, String targetId, String objectName, int oldestMessageId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves a list of messages that meet the specified criteria in the conversation. abstract voidgetHistoryMessages(ConversationType conversationType, String targetId, long sentTime, int before, int after, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)Searches for a specified number of messages before and after a given message in a conversation. abstract List<Message>getHistoryMessages(ConversationType conversationType, String targetId, String objectName, int oldestMessageId, int count)Retrieves a list of messages in the conversation that meet the specified criteria. abstract List<Message>getHistoryMessages(ConversationType conversationType, String targetId, int oldestMessageId, int count)Retrieves a list of messages in the conversation that meet the specified criteria. abstract voidgetLatestMessages(ConversationType conversationType, String targetId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback)Fetches the latest messages from the specified conversation. abstract voidgetMessage(int messageId, IRongCoreCallback.ResultCallback<Message> callback)Retrieves the message body based on the message ID (unique value in the database index). abstract voidgetMessageByUid(String uid, IRongCoreCallback.ResultCallback<Message> callback)Retrieves the message entity by its globally unique ID. abstract voidgetMessageCount(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Integer> callback)Retrieves the total number of messages in the specified conversation. abstract voidgetMessages(ConversationType conversationType, String targetId, HistoryMessageOption historyMsgOption, IRongCoreCallback.IGetMessageCallback callback)Retrieves the history messages of a specified conversation. abstract voidgetNotificationQuietHours(IRongCoreCallback.GetNotificationQuietHoursCallback callback)Retrieves the Do Not Disturb time for message notifications. abstract voidgetOfflineMessageDuration(IRongCoreCallback.ResultCallback<String> callback)Retrieves the offline message storage duration (in days). abstract voidgetPushContentShowStatus(IRongCoreCallback.ResultCallback<Boolean> callback)Retrieves the setting for displaying detailed content of remote push notifications. abstract voidgetPushLanguage(IRongCoreCallback.ResultCallback<IRongCoreEnum.PushLanguage> callback)Retrieves the remote push notification language settings. abstract voidgetPushReceiveStatus(IRongCoreCallback.ResultCallback<Boolean> callback)Retrieves the setting for whether to receive remote push notifications. abstract voidgetRemoteHistoryMessages(ConversationType conversationType, String targetId, long dateTime, int count, IRongCoreCallback.ResultCallback<List<Message>> callback)Fetches historical messages from the server before a specified time. abstract voidgetRemoteHistoryMessages(ConversationType conversationType, String targetId, RemoteHistoryMsgOption remoteHistoryMsgOption, IRongCoreCallback.ResultCallback<List<Message>> callback)Fetches remote history messages for a specified conversation. abstract longgetSendTimeByMessageId(int messageId)Retrieves the send time of a message based on its message ID. abstract voidgetTags(IRongCoreCallback.ResultCallback<List<TagInfo>> callback)Get user tags abstract voidgetTagsFromConversation(ConversationIdentifier conversationIdentifier, IRongCoreCallback.ResultCallback<List<ConversationTagInfo>> callback)Retrieves all tags under the specified conversation abstract voidgetTextMessageDraft(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<String> callback)Retrieves the draft information from a conversation. abstract voidgetTheFirstUnreadMessage(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Message> callback)Get the first unread message. abstract ActivitygetTopForegroundActivity()Retrieves the topmost Activity in the foreground. abstract voidgetTotalUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback)Get the total count of unread messages across all conversations. abstract voidgetTotalUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback, Array<Conversation> conversations)Retrieves the total count of unread messages for all specified conversations. abstract Collection<TypingStatus>getTypingUserListFromConversation(ConversationType conversationType, String targetId)Get the list of users currently typing in the conversation abstract voidgetUnreadCount(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Integer> callback)Retrieves the count of unread messages for the specified conversation. abstract voidgetUnreadCount(Array<ConversationType> conversationTypes, boolean containBlocked, IRongCoreCallback.ResultCallback<Integer> callback)Retrieves the total count of unread messages for specified conversation types. abstract voidgetUnreadCount(Array<ConversationType> conversationTypes, IRongCoreCallback.ResultCallback<Integer> callback)Retrieves the total count of unread messages for specified conversation types. abstract voidgetUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback, Array<ConversationType> conversationTypes)Retrieves the total count of unread messages for specified conversation types. abstract voidgetUnreadMentionedMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves unread mention messages in a conversation. abstract voidgetUnreadMentionedMessages(ConversationType conversationType, String targetId, int count, boolean desc, IRongCoreCallback.ResultCallback<List<Message>> callback)Retrieves unread mention messages in a conversation. abstract voidgetVendorToken(IRongCoreCallback.ResultCallback<String> resultCallback)Retrieves the authentication information of the logged-in user. abstract intgetVideoLimitTime()Retrieves the maximum allowed duration for sending video files. abstract voidinsertIncomingMessage(ConversationType type, String targetId, String senderUserId, ReceivedStatus receivedStatus, MessageContent content, IRongCoreCallback.ResultCallback<Message> resultCallback)Inserts a message into the local conversation with the direction set as received. abstract voidinsertIncomingMessage(ConversationType type, String targetId, String senderUserId, ReceivedStatus receivedStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback)Inserts a message into the local conversation with the direction set as received. abstract voidinsertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, IRongCoreCallback.ResultCallback<Message> resultCallback)Inserts a message into the local conversation. abstract voidinsertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback)Inserts a message into the local conversation with the direction set to sent. abstract booleanisFileDownloading(Object uid)Checks whether the file is currently being downloaded. abstract voidpauseDownloadMediaFile(String fileUniqueId, IRongCoreCallback.OperationCallback callback)Pauses the download of a multimedia file. abstract voidpauseDownloadMediaMessage(Message message, IRongCoreCallback.OperationCallback callback)Pauses the download of a multimedia message. abstract voidrecallMessage(Message message, String pushContent, IRongCoreCallback.ResultCallback<RecallNotificationMessage> callback)Recall message abstract voidremoveConversation(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback)Removes a conversation from the conversation list. abstract voidremoveConversationsFromTag(String tagId, List<ConversationIdentifier> conversationIdentifierList, IRongCoreCallback.OperationCallback callback)Deletes conversations from a specified tag abstract voidremoveFromBlacklist(String userId, IRongCoreCallback.OperationCallback callback)Removes a user from the blocklist. abstract voidremoveMessageExpansion(List<String> keyArray, String messageUId, IRongCoreCallback.OperationCallback callback)Deletes specific key-value pairs from the message extension information abstract voidremoveNotificationQuietHours(IRongCoreCallback.OperationCallback callback)Remove the Do Not Disturb time for message notifications. abstract voidremoveTag(String tagId, IRongCoreCallback.OperationCallback callback)Remove tag abstract voidremoveTagsFromConversation(ConversationIdentifier conversationIdentifier, List<String> tagIds, IRongCoreCallback.OperationCallback callback)Removes specified tags from a conversation abstract voidsaveTextMessageDraft(ConversationType conversationType, String targetId, String content, IRongCoreCallback.ResultCallback<Boolean> callback)Saves draft information for a conversation. abstract voidsearchConversations(String keyword, Array<ConversationType> conversationTypes, Array<String> objectNames, IRongCoreCallback.ResultCallback<List<SearchConversationResult>> resultCallback)Search conversations based on keywords. abstract voidsearchMessages(ConversationType conversationType, String targetId, String keyword, int count, long beginTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)Searches for messages in a specified conversation based on a keyword. abstract voidsearchMessages(ConversationType conversationType, String targetId, String keyword, long startTime, long endTime, int offset, int limit, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)Searches for messages in a specified conversation within a given time range based on keywords. abstract voidsearchMessages(ConversationIdentifier conversationIdentifier, String keyword, Array<String> objectNameList, int limit, long startTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)Searches for local historical messages of specified message types in a specific conversation based on keywords. abstract voidsearchMessagesByUser(ConversationType conversationType, String targetId, String userId, int count, long beginTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)Searches for messages in a specified conversation based on the user ID. abstract voidsendDirectionalMediaMessage(Message message, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallback callback)Sends a targeted multimedia message. abstract voidsendDirectionalMessage(ConversationType type, String targetId, MessageContent content, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback)Sends a targeted message. abstract voidsendDirectionalMessage(Message message, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback)Sends a targeted message. abstract voidsendDirectionalMessage(ConversationType type, String targetId, MessageContent content, Array<String> userIds, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback)Sends a targeted message. abstract voidsendDirectionalMessage(Message message, Array<String> userIds, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback)Sends a targeted message. abstract voidsendImageMessage(ConversationType type, String targetId, MessageContent content, String pushContent, String pushData, IRongCoreCallback.SendImageMessageCallback callback)Sends an image message. abstract voidsendImageMessage(Message message, String pushContent, String pushData, IRongCoreCallback.SendImageMessageCallback callback)Sends an image message. abstract voidsendImageMessage(Message message, String pushContent, String pushData, IRongCoreCallback.SendImageMessageWithUploadListenerCallback callback)Sends an image message and uploads the image to your own server. abstract voidsendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallback callback)Sends a multimedia message. abstract voidsendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallback callback)Sends a multimedia message. abstract voidsendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback)Sends a multimedia message. abstract voidsendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback)Sends a multimedia message. abstract voidsendMessage(ConversationType type, String targetId, MessageContent content, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback)Sends a message based on the conversation type. abstract voidsendMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback)Sends a message. abstract voidsendMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback)Sends a message. abstract voidsendPing()OEM implements heartbeat alignment by sending Ping interface. abstract voidsendReadReceiptMessage(ConversationType conversationType, String targetId, long timestamp)Sends a read receipt for messages in a specific conversation. abstract voidsendReadReceiptMessage(ConversationType conversationType, String targetId, long timestamp, IRongCoreCallback.ISendMessageCallback callback)Sends a read receipt for messages in a specific conversation. abstract voidsendReadReceiptRequest(Message message, IRongCoreCallback.OperationCallback callback)Initiates a read receipt request for a message (only supported for groups and discussion groups). abstract voidsendReadReceiptResponse(ConversationType type, String targetId, List<Message> messageList, IRongCoreCallback.OperationCallback callback)Send read receipts (only supported for groups and discussion groups) abstract voidsendTypingStatus(ConversationType conversationType, String targetId, String typingContentType)Sends a typing status to the conversation. abstract voidsetConversationStatusListener(IRongCoreListener.ConversationStatusListener listener)Sets up multi-device synchronization for conversation status (pin and Do Not Disturb) listeners. abstract voidsetReadReceiptV4Listener(IRongCoreListener.ReadReceiptV4Listener listener)abstract voidsetConversationTagListener(IRongCoreListener.ConversationTagListener listener)Sets up multi-device synchronization monitoring for Tags abstract voidsetConversationToTopInTag(String tagId, ConversationIdentifier conversationIdentifier, boolean isTop, IRongCoreCallback.OperationCallback callback)Set the top status of a conversation in a tag abstract voidsetConversationToTop(ConversationType conversationType, String targetId, boolean isTop, boolean needCreate, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the pinned status of a conversation. abstract voidsetConversationToTop(ConversationType conversationType, String id, boolean isTop, boolean needCreate, boolean needUpdateTime, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the pinned status of a conversation. abstract voidsetConversationToTop(ConversationType conversationType, String targetId, boolean isTop, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the sticky status of a conversation. abstract voidsetMessageBlockListener(IRongCoreListener.MessageBlockListener listener)Sets the listener for blocked messages containing sensitive words. abstract voidsetMessageExpansionListener(IRongCoreListener.MessageExpansionListener listener)Sets the message extension listener abstract voidsetMessageExtra(int messageId, String value, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the additional information for a local message. abstract voidsetMessageReadTime(long messageId, long timestamp, IRongCoreCallback.OperationCallback callback)Sets the read timestamp for a message. abstract voidsetMessageReceivedStatus(int messageId, ReceivedStatus receivedStatus, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the message received status. abstract voidsetMessageSentStatus(Message message, IRongCoreCallback.ResultCallback<Boolean> callback)Sets the message sending status. abstract voidsetNotificationQuietHours(String startTime, int spanMinutes, IRongCoreCallback.OperationCallback callback)Sets the Do Not Disturb time for message notifications. abstract voidsetOfflineMessageDuration(int duration, IRongCoreCallback.ResultCallback<Long> callback)Sets the storage duration for offline messages on the server (in days). abstract voidsetOnReceiveDestructionMessageListener(IRongCoreListener.OnReceiveDestructionMessageListener listener)Sets the listener for receiving auto-destroy messages. abstract voidsetPushContentShowStatus(boolean showStatus, IRongCoreCallback.OperationCallback callback)Sets whether to display the details of remote push notifications. abstract voidsetPushLanguage(IRongCoreEnum.PushLanguage language, IRongCoreCallback.OperationCallback callback)Sets the language for remote push notifications. abstract voidsetPushLanguageCode(String language, IRongCoreCallback.OperationCallback callback)Sets the natural language for push notification content. abstract voidsetPushNotificationListener(IRongCoreListener.PushNotificationListener listener)Sets up a listener for changes in push notification configuration. abstract voidsetPushReceiveStatus(boolean receiveStatus, IRongCoreCallback.OperationCallback callback)Sets whether to receive remote notifications. abstract voidsetReconnectKickEnable(boolean enable)Sets whether to kick out the reconnecting device during reconnection. abstract voidsetRLogFileMaxSize(long pSize)Sets the size of the business log file, with a default of 1M. abstract voidsetRLogLevel(int pLevel)Sets the console log level. abstract voidsetSyncConversationReadStatusListener(IRongCoreListener.SyncConversationReadStatusListener listener)Sets the listener for multi-device synchronization of conversation read status. abstract voidsetTagListener(IRongCoreListener.TagListener listener)Sets the callback for conversation tag changes. abstract voidsetUploadCallback(UploadCallback pCallback)Sets the callback for uploading RLog logs to the server. abstract voidstopDestructMessage(Message message)Cancel the burn-after-reading message. abstract voidsupportResumeBrokenTransfer(String url, IRongCoreCallback.ResultCallback<Boolean> callback)Determines whether resumable upload is supported. abstract voidswitchAppKey(String appKey)Switch appKey. abstract voidsyncConversationReadStatus(ConversationType type, String targetId, long timestamp, IRongCoreCallback.OperationCallback callback)Synchronizes the read status of a conversation. abstract voidupdateConversationInfo(ConversationType conversationType, String targetId, String title, String portrait, IRongCoreCallback.ResultCallback<Boolean> callback)Updates conversation information. abstract voidupdateMessageExpansion(Map<String, String> expansion, String messageUId, IRongCoreCallback.OperationCallback callback)Update message extension information Each message can carry a maximum of 300 key-value pairs of extension information. abstract voidaddToBlacklist(String userId, IRongCoreCallback.OperationCallback callback)Adds a user to the blocklist. abstract MapdoMethod(String clazzName, String methodKey, Map param)abstract voidupdateTag(TagInfo tagInfo, IRongCoreCallback.OperationCallback callback)Update Tag abstract voidgetUnreadCountByTag(String tagId, boolean containBlocked, IRongCoreCallback.ResultCallback<Integer> callback)Get unread message count by tag abstract RCConfigurationgetRCConfiguration()IM Configuration abstract voidupdateRcConfiguration(RCConfiguration configuration)Update RCConfiguration Must be set after the init method is executed to take effect abstract booleanisTextTranslationSupported()Indicates whether the translation feature is supported. abstract TranslationInfogetTranslationInfo(int messageId, String language)Retrieves cached translation information abstract voidsaveMessageTranslation(int messageId, String content, String targetLanguage)Save translation abstract StringgetAIAddress()Get the translation URL abstract voidsetAppVer(String appVer)Sets the application version information for users integrating the RCSDK. abstract voidsetPingTimeOut(int time)abstract voidenableSingleProcess(boolean enable)Sets whether to enable single process mode. abstract booleansetProxy(RCIMProxy proxy)Set Proxy abstract RCIMProxygetCurrentProxy()Retrieves the current proxy. abstract voidsetCheckDuplicateMessage(boolean enableCheck)Set the RCmessage deduplication switch When the sender sends a message under poor network conditions, the message reaches the server but the sender does not receive the server's ack, causing the sender to assume the message failed to send. abstract StringgetMinioOSSAddr()abstract voidsendReadReceiptMessageV4(ConversationType conversationType, String targetId, String startMessageUID, String endMessageUID, IRongCoreCallback.OperationCallback callback)Send read receipt v4 (supports one-to-one and group chat) abstract voidgetMessageReadReceiptV4(String targetId, String messageUID, IRongCoreCallback.ResultCallbackEx<Integer, Integer, List<GroupMessageReader>> callback)Get the list of users who have read the message (supports group chats) abstract voidsubscribeEvent(SubscribeEventRequest request, IRongCoreCallback.SubscribeEventCallback<List<String>> callback)Subscribes to user status events. abstract voidunSubscribeEvent(SubscribeEventRequest request, IRongCoreCallback.SubscribeEventCallback<List<String>> callback)Unsubscribes from user status events. abstract voidaddSubscribeEventListener(OnSubscribeEventListener listener)Adds a subscription event listener. abstract voidquerySubscribeEvent(SubscribeEventRequest request, IRongCoreCallback.ResultCallback<List<SubscribeInfoEvent>> callback)Queries the current status of subscribed events. abstract voidquerySubscribeEvent(SubscribeEventRequest request, int pageSize, int startIndex, IRongCoreCallback.ResultCallback<List<SubscribeInfoEvent>> callback)abstract voidupdateMyUserProfile(UserProfile profile, IRongCoreCallback.UpdateUserProfileCallback callback)Update user profile Note: It is recommended to fetch the user profile first and then update the profile based on the latest user profile. abstract voidgetUserProfiles(List<String> userIdList, IRongCoreCallback.ResultCallback<List<UserProfile>> callback)Batch retrieve user profiles abstract voidgetMyUserProfile(IRongCoreCallback.ResultCallback<UserProfile> callback)Get the current user profile abstract voidupdateMyUserProfileVisibility(UserProfileVisibility visibility, IRongCoreCallback.ResultCallback<Boolean> callback)User Permission Settings abstract voidgetMyUserProfileVisibility(IRongCoreCallback.ResultCallback<UserProfileVisibility> callback)User Permission Retrieval abstract voidsetDatabaseOperationTimeThreshold(int milliseconds)abstract voidsearchUserProfileByUniqueId(String uniqueId, IRongCoreCallback.ResultCallback<UserProfile> callback)Search for user information by exact user application ID abstract voidcreateGroup(GroupInfo groupInfo, List<String> inviteeUserIds, IRongCoreCallback.CreateGroupCallback callback)Create Group Note: The following attributes can be set in the group information (GroupInfo): 1. abstract voidupdateGroupInfo(GroupInfo groupInfo, IRongCoreCallback.OperationCallbackEx<String> callback)Update group information The group information update mode, defined by , determines whether group information and permission details can be modified. abstract voidgetGroupsInfo(List<String> groupIds, IRongCoreCallback.ResultCallback<List<GroupInfo>> callback)Batch Retrieve Group Information Note: Only returns information for existing groups. abstract voidkickGroupMembers(String groupId, List<String> userIds, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback)Remove from Group Note: After a user is removed, the group conversation information is retained, but the user will no longer receive messages from this group. abstract voidquitGroup(String groupId, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback)Exit a group Note: After exiting, the group conversation information is retained, but the user will no longer receive messages from this group. abstract voiddismissGroup(String groupId, IRongCoreCallback.OperationCallback callback)Dismiss a group Note: Only the group owner can dismiss a group they created. abstract voidtransferGroupOwner(String groupId, String newOwnerId, boolean quitGroup, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback)Transfer group ownership abstract voidaddGroupManagers(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback)Add Group Administrators Note: Only the group owner can add group administrators. abstract voidremoveGroupManagers(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback)Remove group administrators abstract voidgetGroupMembersByRole(String groupId, GroupMemberRole role, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupMemberInfo> callback)Retrieve the member list of a specified group with pagination. abstract voidgetGroupMembers(String groupId, List<String> userIds, IRongCoreCallback.ResultCallback<List<GroupMemberInfo>> callback)Retrieves information about specified group members abstract voidsetGroupMemberInfo(String groupId, String userId, String nickname, String extra, IRongCoreCallback.OperationCallback callback)Set group member profile The group member information update mode, memberInfoEditPermission , determines whether group member profiles can be modified. abstract voidsearchGroupMembers(String groupId, String name, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupMemberInfo> callback)Query group member information based on group member nickname. abstract voidjoinGroup(String groupId, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback)Join a group The group join permission io.rong.imlib.model. abstract voidinviteUsersToGroup(String groupId, List<String> userIds, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback)Invite Users to Join a Group Who can invite others to join the group is determined by . abstract voidacceptGroupInvite(String groupId, String inviterId, IRongCoreCallback.OperationCallback callback)User agrees to join a group abstract voidrefuseGroupInvite(String groupId, String inviterId, String reason, IRongCoreCallback.OperationCallback callback)User declined to join the group abstract voidacceptGroupApplication(String groupId, String inviterId, String applicantId, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback)The group owner or administrator approves the user to join the group. abstract voidrefuseGroupApplication(String groupId, String inviterId, String applicantId, String reason, IRongCoreCallback.OperationCallback callback)The group owner or administrator rejects a user's request to join the group. abstract voidgetGroupApplications(PagingQueryOption option, Array<GroupApplicationDirection> directions, Array<GroupApplicationStatus> status, IRongCoreCallback.PageResultCallback<GroupApplicationInfo> callback)Fetch paginated group request list abstract voidgetJoinedGroupsByRole(GroupMemberRole role, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupInfo> callback)Paginated query for the list of groups a user belongs to abstract voidsearchJoinedGroups(String groupName, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupInfo> callback)Search for groups I have joined by group name abstract voidgetJoinedGroups(List<String> groupIds, IRongCoreCallback.ResultCallback<List<GroupInfo>> callback)Batch retrieve the groups I have joined abstract voidsetGroupRemark(String groupId, String remark, IRongCoreCallback.OperationCallback callback)Set Group Alias abstract voidaddGroupFollows(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback)Set special attention users for a group abstract voidremoveGroupFollows(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback)Remove users from the group's special attention list abstract voidgetGroupFollows(String groupId, IRongCoreCallback.ResultCallback<List<FollowInfo>> callback)Query the list of specially followed users in a group abstract voidsetGroupEventListener(GroupEventListener listener)abstract voidaddFriend(String userId, DirectionType directionType, String extra, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback)Add Friend abstract voiddeleteFriends(List<String> userIds, DirectionType directionType, IRongCoreCallback.OperationCallback callback)Remove Friends Note: Mutual friend removal: Removes the friend from both parties' friend lists. abstract voidacceptFriendApplication(String userId, IRongCoreCallback.OperationCallback callback)Agree to add as a friend abstract voidrefuseFriendApplication(String userId, IRongCoreCallback.OperationCallback callback)Reject friend request abstract voidsetFriendInfo(String userId, String remark, Map<String, String> extProfile, IRongCoreCallback.OperationCallback callback)Set friend information abstract voidcheckFriends(List<String> userIds, DirectionType directionType, IRongCoreCallback.ResultCallback<List<FriendRelationInfo>> callback)Check friend relationship For details on friend relationship types, refer to abstract voidgetFriends(QueryFriendsDirectionType type, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback)Get the complete friend list abstract voidgetFriendApplications(PagingQueryOption option, Array<FriendApplicationType> types, Array<FriendApplicationStatus> status, IRongCoreCallback.PageResultCallback<FriendApplicationInfo> callback)Paginate through the list of friend requests abstract voidgetFriendsInfo(List<String> userIds, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback)Search for friend information based on user IDs abstract voidsearchFriendsInfo(String name, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback)Search for friend information based on nickname abstract voidsetFriendAddPermission(FriendAddPermission permission, IRongCoreCallback.OperationCallback callback)Sets the friend request permission for the current user. abstract voidgetFriendAddPermission(IRongCoreCallback.ResultCallback<FriendAddPermission> callback)Get the current user's friend request permission abstract voidsetFriendEventListener(FriendEventListener listener)abstract IRongCoreEnum.CoreErrorCoderemoveDatabase(String userId)Deletes the message database for the specified user. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        getInstancestatic RongCoreClient getInstance() - Since:
- 5.0.0 
 
 - 
                                        initstatic void init(Context context) Initializes the SDK. This should be called only once globally within the application. It is recommended to call this method in the Application subclass. - Parameters:
- context- The Context of the Application class.
- Since:
- 5.0.0 
 
 - 
                                        initstatic void init(Context context, String appKey) Initializes the SDK. This should be called only once globally within the application, preferably in the Application subclass. - Parameters:
- context- The Context of the Application class.
- appKey- The App Key obtained after creating an application on the RCdeveloper platform.
- Since:
- 5.0.0 
 
 - 
                                        initstatic void init(Context context, String appKey, boolean enablePush) Initializes the SDK. This method should be called only once globally in the application, preferably in the Application subclass. - Parameters:
- context- The Context of the Application class.
- appKey- The App Key obtained after creating an application on the RCdeveloper platform.
- enablePush- Specifies whether to enable push notification.
- Since:
- 5.0.0 
 
 - 
                                        initstatic void init(Context context, String appKey, boolean enablePush, Boolean isMainProcess) Initializes the SDK. This should be called only once globally in the application. It is recommended to call this in the Application inherited class. - Parameters:
- context- The Context of the Application class.
- appKey- The App Key obtained after creating an application on the RCDeveloper Platform.
- enablePush- Whether to enable push notifications.
- Since:
- 5.1.3 
 
 - 
                                        initstatic void init(Context context, String appKey, InitOption option) Initializes the SDK. This should be called only once globally in the application. - Parameters:
- context- The Context of the Application class.
- appKey- The App Key obtained after creating an application on the RCdeveloper platform.
- option- The configuration information required for initialization.
- Since:
- 5.3.4 
 
 - 
                                        connectstatic RongCoreClient connect(String token, IRongCoreCallback.ConnectCallback connectCallback) Connects to the RCserver. This method should be called only once globally in the entire application and must be invoked after init. If you are using IMKit, please use the method of the same name in IMCenter to establish a connection with the RCserver instead of using this method. When this method is called, the SDK will continuously attempt to reconnect until one of the following two scenarios occurs: First, the connection is successful, and the onSuccess(userId) callback is triggered. Second, an error that the SDK cannot handle occurs (e.g., an invalid token), and the onError(errorCode) callback is triggered, after which no further reconnection attempts are made. If you do not want to keep retrying, you can use the connect(String, int, ConnectCallback) method and set a connection timeout limit (timeLimit). Once the connection is successful, the SDK will handle all reconnection processes. In case of a network disconnection, the SDK will continuously retry until the connection is re-established, without requiring any additional connection operations from you. - Parameters:
- token- The user authentication token (Token) obtained from the server.
- connectCallback- The callback for the connection result.
- Returns:
- RongCoreClient An instance of the IM client core class. 
- Since:
- 5.0.0 
 
 - 
                                        connectstatic RongCoreClient connect(String token, int timeLimit, IRongCoreCallback.ConnectCallback connectCallback) Retrieves an instance of the IMLib interface class. This method must be called after initializing the SDK with the init method; otherwise, it returns null. - Returns:
- An instance of the IMLib interface class. 
- Since:
- 5.0.0 
 
 - 
                                        getVersionstatic String getVersion() - Since:
- 5.2.1 
 
 - 
                                        getCommitIdstatic String getCommitId() Retrieves the SDK commit pointer - Since:
- 5.4.0 
 
 - 
                                        addConnectionStatusListenerstatic boolean addConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener) Adds a listener for connection status changes. When the callback status is TOKEN_INCORRECT, you need to obtain a valid token and actively call connect. If using IMKit, use the method of the same name in RongIM setConnectionStatusListener.- Parameters:
- listener- The listener for connection status changes.
- Since:
- 5.1.6 
 
 - 
                                        setConnectionStatusListener@Deprecated() static void setConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener) Sets a listener for connection status changes. When the callback status is TOKEN_INCORRECT, you need to obtain the correct token and actively call connect. If using IMKit, use the method of the same name in RongIM setConnectionStatusListener.- Parameters:
- listener- The listener for connection status changes.
- Since:
- 5.0.0 
 
 - 
                                        removeConnectionStatusListenerstatic boolean removeConnectionStatusListener(IRongCoreListener.ConnectionStatusListener listener) Remove the listener for connection status changes. - Parameters:
- listener- The listener for connection status changes.
- Since:
- 5.1.6 
 
 - 
                                        addDatabaseStatusListenerabstract void addDatabaseStatusListener(IRongCoreListener.DatabaseUpgradeStatusListener listener) Sets the database upgrade status listener - Parameters:
- listener- The database upgrade status listener
- Since:
- 5.10.2 
 
 - 
                                        removeDatabaseStatusListenerabstract void removeDatabaseStatusListener(IRongCoreListener.DatabaseUpgradeStatusListener listener) Removes the database upgrade status listener - Parameters:
- listener- The database upgrade status listener
- Since:
- 5.10.2 
 
 - 
                                        addOnReceiveMessageListenerstatic boolean addOnReceiveMessageListener(OnReceiveMessageWrapperListener listener) Adds a listener for the message received event. Note: It is recommended to set a global listener for the application lifecycle. - Parameters:
- listener- The listener for receiving messages.
- Returns:
- Indicates whether the addition was successful. 
- Since:
- 5.1.5 
 
 - 
                                        setOnReceiveMessageListener@Deprecated() static void setOnReceiveMessageListener(IRongCoreListener.OnReceiveMessageListener listener) Sets the listener for receiving message events. Note: It is recommended to set a global listener for the application lifecycle. - Parameters:
- listener- The listener for receiving messages.
- Since:
- 5.0.0 
 
 - 
                                        removeOnReceiveMessageListenerstatic boolean removeOnReceiveMessageListener(OnReceiveMessageWrapperListener listener) Removes the listener for message received events. - Parameters:
- listener- The listener for receiving messages.
- Returns:
- Indicates whether the removal was successful. 
- Since:
- 5.1.5 
 
 - 
                                        setServerInfostatic void setServerInfo(String naviServer, String fileServer) Sets the navigation server and media server addresses for private deployment. Supports setting addresses in the format of http://cn.xxx.com, https://cn.xxx.com, or cn.xxx.com. If cn.xxx.com is provided, the SDK will assemble it into the http:// protocol format. Multiple navigation addresses are supported and must be separated by semicolons (;). Note: This method must be used before init! This interface has the same effect as the naviServer and fileServer parameters passed in InitOption within init. Either method of setting will take effect. - Parameters:
- naviServer- The navigation server address for private deployment.
- fileServer- The media server address for private deployment, i.e., the upload address for files and images.
- Since:
- 5.0.0 
 
 - 
                                        setStatisticDomainstatic void setStatisticDomain(String domain) Configures the data upload URL (optional). By configuring this URL, the SDK will upload device-related information to the private cloud node during initialization. This affects the broadcast push functionality in the developer console. If private cloud customers do not configure this URL, clients will not receive push notifications sent from the console. Regular IM push notifications are not affected. Sets the data upload server URL. Supports setting URLs in the format of http://cn.xxx.com, https://cn.xxx.com, or cn.xxx.com. If set to cn.xxx.com, the SDK will assemble it into the http:// protocol format. - Parameters:
- domain- The domain name
- Since:
- 5.0.0 
 
 - 
                                        registerMessageType@Deprecated() static void registerMessageType(Class<out MessageContent> messageContentClass) Register custom message types Call this method after initialization and before connecting to register custom messages. - Parameters:
- messageContentClass- The class of the custom message, which must inherit from .
- Since:
- 5.0.0 
 
 - 
                                        registerMessageTypestatic void registerMessageType(List<Class<out MessageContent>> messageContentClassList) Batch register custom message types Call this method to register custom messages after initialization and before connecting. - Parameters:
- messageContentClassList- A list of custom message classes.
- Since:
- 5.0.0 
 
 - 
                                        setOnRecallMessageListenerstatic void setOnRecallMessageListener(IRongCoreListener.OnRecallMessageListener listener) Sets the message recall listener - Parameters:
- listener- The message recall listener
- Since:
- 5.0.0 
 
 - 
                                        setTypingStatusListenerstatic void setTypingStatusListener(IRongCoreListener.TypingStatusListener listener) Sets the typing status listener. When the typing status changes, the callback onTypingStatusChanged is triggered. For one-to-one chats, the listener is triggered once when the other party is typing, and once again when the other party stops typing, but the callback will return an empty list of typing users. - Parameters:
- listener- The typing status listener
- Since:
- 5.0.0 
 
 - 
                                        setReadReceiptListenerstatic void setReadReceiptListener(IRongCoreListener.ReadReceiptListener listener) Sets the message receipt listener. Triggers the callback onReadReceiptReceived when a message receipt is received. - Parameters:
- listener- The message receipt listener
- Since:
- 5.0.0 
 
 - 
                                        setRCLogInfoListenerstatic void setRCLogInfoListener(IRongCoreListener.RCLogInfoListener listener) Sets the log output listener. Note: This must be called before connect! - Parameters:
- listener- Log output listener @Deprecated
- Since:
- 5.0.0 
 
 - 
                                        addConversationsToTagabstract void addConversationsToTag(String tagId, List<ConversationIdentifier> conversationIdentifierList, IRongCoreCallback.OperationCallback callback) Adds a conversation to a tag - Parameters:
- tagId- The ID of the tag
- conversationIdentifierList- The list of conversations
- callback- Callback for adding a conversation to a tag
- Since:
- 5.1.1 
 
 - 
                                        addTagabstract void addTag(TagInfo tagInfo, IRongCoreCallback.OperationCallback callback) Create a tag - Parameters:
- tagInfo- TagInfo
- callback- Callback for tag creation
- Since:
- 5.1.1 
 
 - 
                                        appOnStartabstract void appOnStart() Notifies the SDK that the application has returned to the foreground. Note: This method must be called after init. @Deprecated - Since:
- 5.0.0 
 
 - 
                                        batchInsertMessageabstract void batchInsertMessage(List<Message> messages, IRongCoreCallback.ResultCallback<Boolean> callback) Batch inserts received messages (these messages are only inserted into the local database and are not actually sent to the server or the other party). The following attributes of the Message will be stored in the database, while other attributes will be discarded: - conversationType: Conversation type - targetId: Conversation ID - messageDirection: Message direction - senderUserId: Sender ID - receivedStatus: Receipt status; if the message direction is inbound and message.getReceivedStatus().setRead() has not been called, the message is unread. - sentStatus: Sending status - content: Message content - sentTime: Message sending time (Unix timestamp in milliseconds, which affects message sorting) - extra: Additional fields of the Message This method does not support chatroom conversation types. Each batch can process up to 500 messages. If the batch exceeds 500 messages, it will return RC_INVALID_PARAMETER_MESSAGE_LIST. The unread count of the messages will be accumulated to the conversation's unread count. - Parameters:
- messages- List of messages to be processed in batch
- callback- Callback
- Since:
- 5.1.1 
 
 - 
                                        batchInsertMessageabstract void batchInsertMessage(List<Message> messages, boolean enableCheck, IRongCoreCallback.ResultCallback<Boolean> callback) Batch inserts received messages (these messages are only inserted into the local database and will not be sent to the server or the other party). The following attributes of the Message will be stored in the database, while other attributes will be discarded: - conversationType: Conversation type - targetId: Conversation ID - UId: Unique message ID - messageDirection: Message direction - senderUserId: Sender ID - receivedStatus: Receipt status; if the message direction is incoming and message.getReceivedStatus().setRead() has not been called, the message is unread. - sentStatus: Sending status - content: Message content - sentTime: Message sending time (Unix timestamp in milliseconds, which affects message sorting) - extra: Additional fields of the Message This method does not support chatroom conversation types. Each batch can process up to 500 messages. If the batch exceeds 500 messages, it will return RC_INVALID_PARAMETER_MESSAGE_LIST. The unread count of messages will be accumulated into the unread count of the conversation. - Parameters:
- messages- List of messages to be processed in batch
- enableCheck- Whether message deduplication is required
- callback- Callback
- Since:
- 5.3.5 
 
 - 
                                        beginDestructMessageabstract void beginDestructMessage(Message message, IRongCoreListener.DestructCountDownTimerListener pListener) Starts burning the message, only supported in one-to-one chat. - Parameters:
- message- The message to be burned
- pListener- Countdown callback interface
- Since:
- 5.0.0 
 
 - 
                                        cancelDownloadMediaMessageabstract void cancelDownloadMediaMessage(Message message, IRongCoreCallback.OperationCallback callback) Cancels the download of a multimedia message. - Parameters:
- message- The multimedia file message.
- callback- The callback triggered when the download is canceled.
- Since:
- 5.0.0 
 
 - 
                                        getPrivateDownloadToken@Deprecated() abstract void getPrivateDownloadToken(String fileName, IRongCoreCallback.ResultCallback<String> callback) This interface is only applicable for private cloud SDK calls. The current version is no longer supported. Private cloud users should use the new interface getMediaUploadAuthorInfo - Parameters:
- fileName- The name of the file
- callback- Returns the authentication token
 
 - 
                                        getMediaUploadAuthorInfoabstract void getMediaUploadAuthorInfo(String fileName, String url, IRongCoreCallback.ResultCallback<MediaUploadAuthorInfo> callback) Retrieves the private cloud token for multimedia download. - Parameters:
- fileName- The name of the multimedia file.
- callback- The callback function.
- Since:
- 5.2.3 
 
 - 
                                        cancelSDKHeartBeatabstract void cancelSDKHeartBeat() Cancels the wakelock heartbeat. This should be called once globally for the entire application after a successful connection. - Since:
- 5.2.2 
 
 - 
                                        cancelSendMediaMessageabstract void cancelSendMediaMessage(Message message, IRongCoreCallback.OperationCallback callback) Cancels the sending of a multimedia file. - Parameters:
- message- The multimedia file message.
- callback- Callback triggered when the multimedia file sending is canceled.
- Since:
- 5.0.0 
 
 - 
                                        cleanHistoryMessagesabstract void cleanHistoryMessages(ConversationType conversationType, String targetId, long recordTime, boolean cleanRemote, IRongCoreCallback.OperationCallback callback) Deletes messages before the specified timestamp, with the option to also delete messages on the server. This method can clear historical messages from the server, but the historical message cloud storage feature must be enabled first. Clears local database messages (server-side historical messages) before the specified timestamp for a specific conversation based on the conversation type and conversation ID. After successful deletion, only historical messages after this timestamp can be retrieved from the local database (server). - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- recordTime- The timestamp before which messages will be cleared.
- cleanRemote- Whether to delete messages on the server.
- callback- The callback for message deletion.
- Since:
- 5.0.0 
 
 - 
                                        cleanRemoteHistoryMessagesabstract void cleanRemoteHistoryMessages(ConversationType conversationType, String targetId, long recordTime, IRongCoreCallback.OperationCallback callback) Clears historical messages stored on the server. Clears server-side historical messages before the specified timestamp for a specific conversation based on the conversation type and target conversation ID. After successful clearance, only historical messages after this timestamp can be retrieved from the server. Note: The historical message cloud storage feature must be enabled first! - Parameters:
- conversationType- The conversation type.
- targetId- The conversation ID.
- recordTime- The timestamp for clearing messages, where- 0 <= recordTime <= the sentTime of the last message in the current conversation.
- callback- The callback for clearing messages.
- Since:
- 5.0.0 
 
 - 
                                        clearConversationsabstract void clearConversations(IRongCoreCallback.ResultCallback<Boolean> callback, Array<ConversationType> conversationTypes) Clears all conversations and conversation messages of the specified conversation types from the list. - Parameters:
- callback- Callback indicating whether the operation was successful.
- conversationTypes- List of conversation types to be cleared.
- Since:
- 5.0.0 
 
 - 
                                        clearConversationsByTagabstract void clearConversationsByTag(String tagId, boolean deleteMessage, IRongCoreCallback.ResultCallback<Boolean> callback) Deletes all conversations under the specified tag. Note: This operation will unbind the relationship between the conversation and the tag. Re-binding is required if you call this again. - Parameters:
- tagId- The ID of the tag
- deleteMessage- Indicates whether to delete the messages
- callback- Callback for tag deletion
- Since:
- 5.1.5 
 
 - 
                                        clearMessagesabstract void clearMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback) Deletes all messages in a specific conversation. Note: Chatrooms are not supported! - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- callback- Callback indicating whether the operation was successful.
- Since:
- 5.0.0 
 
 - 
                                        clearMessagesUnreadStatusabstract void clearMessagesUnreadStatus(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback) Clears the unread message count for a specific conversation. Note: Not supported for chatrooms or ultra groups. - Parameters:
- conversationType- The type of conversation.
- targetId- The conversation ID.
- callback- Callback indicating whether the operation was successful.
- Since:
- 5.0.0 
 
 - 
                                        clearMessagesUnreadStatusabstract void clearMessagesUnreadStatus(ConversationType conversationType, String targetId, long timestamp, IRongCoreCallback.OperationCallback callback) Clears the unread message count for a specific conversation. Note: Not supported for chatrooms or ultra groups - Parameters:
- conversationType- The type of conversation.
- targetId- The conversation ID.
- timestamp- The timestamp of the last message read in this conversation.
- callback- Callback indicating whether the operation was successful.
- Since:
- 5.0.0 
 
 - 
                                        clearMessagesUnreadStatusByTagabstract void clearMessagesUnreadStatusByTag(String tagId, IRongCoreCallback.ResultCallback<Boolean> callback) Clears the unread message count for all conversations under the specified tag. - Parameters:
- tagId- The tag ID.
- callback- Callback for clearing the conversations.
- Since:
- 5.1.5 
 
 - 
                                        clearTextMessageDraftabstract void clearTextMessageDraft(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback) Deletes the draft information in the specified conversation. - Parameters:
- conversationType- The type of the conversation.
- targetId- The ID of the conversation.
- callback- The callback indicating whether the deletion was successful.
- Since:
- 5.0.0 
 
 - 
                                        deleteMessagesabstract void deleteMessages(Array<int> messageIds, IRongCoreCallback.ResultCallback<Boolean> callback) Deletes messages. - Parameters:
- messageIds- An array of message IDs to be deleted.
- callback- Callback indicating whether the deletion was successful.
- Since:
- 5.0.0 
 
 - 
                                        deleteMessagesabstract void deleteMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback) Deletes all messages in a specific conversation. This interface deletes all messages in the database for the specified conversation and cleans up the database space to reduce storage usage. - Parameters:
- conversationType- The type of conversation.
- targetId- The conversation ID.
- callback- Callback indicating whether the deletion was successful.
- Since:
- 5.0.0 
 
 - 
                                        deleteRemoteMessagesabstract void deleteRemoteMessages(ConversationType conversationType, String targetId, Array<Message> messages, IRongCoreCallback.OperationCallback callback) Batch deletes specified remote messages in a conversation (and deletes the corresponding local messages). A single batch operation only supports deleting messages from the same conversation. Ensure all messages in the list belong to the same conversation. A maximum of 100 messages can be deleted at once.Note: Chatrooms are not supported! Versions below 5.6.9 do not support the ultra group conversation type. Support for ultra group conversation types starts from version 5.6.9. - Parameters:
- conversationType- The conversation type.
- targetId- The conversation ID.
- messages- The array of messages to be deleted.
- callback- Callback indicating whether the deletion was successful.
- Since:
- 5.0.0 
 
 - 
                                        disconnectabstract void disconnect() Disconnects from the RCserver while still receiving remote notifications. If you want to disconnect and stop receiving remote notifications, you can call logout.Note: The SDK automatically reconnects when the app switches between foreground and background or when network exceptions occur, ensuring connection reliability. Therefore, unless your app logic requires logging out, you generally do not need to call this method to manually disconnect. - Since:
- 5.0.0 
 
 - 
                                        disconnectabstract void disconnect(boolean isReceivePush) Disconnects from the RCserver and determines whether to continue receiving remote push notifications based on the parameter. - Parameters:
- isReceivePush-- trueto continue receiving remote push notifications after disconnection;- falseto stop receiving remote push notifications after disconnection.
- Since:
- 5.0.0 
 
 - 
                                        logoutabstract void logout() Disconnects from the RCserver and stops receiving remote push notifications. To disconnect while still receiving remote push notifications, use disconnect. - Since:
- 5.0.0 
 
 - 
                                        downloadMediaabstract void downloadMedia(ConversationType conversationType, String targetId, IRongCoreEnum.MediaType mediaType, String imageUrl, IRongCoreCallback.DownloadMediaCallback callback) Downloads multimedia files. If the file exists in the local cache, it will be fetched directly from the cache. Otherwise, it will be downloaded from the server. - Parameters:
- conversationType- The type of conversation.
- targetId- The conversation ID.
- mediaType- The type of file.
- imageUrl- The URL of the file.
- callback- The callback for the file download.
- Since:
- 5.0.0 
 
 - 
                                        downloadMediaMessageabstract void downloadMediaMessage(Message message, IRongCoreCallback.IDownloadMediaMessageCallback callback) Download multimedia files. - Parameters:
- message- The media message (FileMessage, SightMessage, GIFMessage, HQVoiceMessage, etc.).
- callback- The callback for downloading the file.
- Since:
- 5.0.0 
 
 - 
                                        downloadMediaFileabstract void downloadMediaFile(String fileUniqueId, String fileUrl, String fileName, String path, IRongCoreCallback.IDownloadMediaFileCallback callback) Download a file. Supports resumable downloads. To pause the download, call pauseDownloadMediaFile. - Parameters:
- fileUniqueId- The unique identifier of the file, corresponding to the first parameter of pauseDownloadMediaFile.
- fileUrl- The download URL of the file.
- fileName- The name of the file.
- path- The directory to save the downloaded file.
- callback- The callback for the file download.
- Since:
- 5.0.0 
 
 - 
                                        getBlacklistabstract void getBlacklist(IRongCoreCallback.GetBlacklistCallback callback) Retrieves the blocklist of the current user. - Parameters:
- callback- Callback for retrieving the blocklist.
- Since:
- 5.0.0 
 
 - 
                                        getBlacklistStatusabstract void getBlacklistStatus(String userId, IRongCoreCallback.ResultCallback<IRongCoreEnum.BlacklistStatus> callback) Checks whether a user is in the blocklist. - Parameters:
- userId- The user ID.
- callback- Callback to check if the user is in the blocklist.
- Since:
- 5.0.0 
 
 - 
                                        getBlockedConversationListabstract void getBlockedConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes) Retrieves the list of conversations with Do Not Disturb enabled. - Parameters:
- callback- Callback for retrieving conversations with Do Not Disturb.
- conversationTypes- Conversation types, Conversation.
- Since:
- 5.0.0 
 
 - 
                                        getConversationabstract void getConversation(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Conversation> callback) Retrieves information for a single conversation. - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- callback- Callback for retrieving the conversation information.
- Since:
- 5.0.0 
 
 - 
                                        getConversationsabstract void getConversations(List<ConversationIdentifier> conversationIdentifiers, IRongCoreCallback.ResultCallback<List<Conversation>> callback) Method to retrieve a list of conversations. Description: Retrieves a list of conversation objects based on the provided conversation identifiers. This method can be implemented to handle conversation retrieval, such as loading conversation data from a database or requesting it from the network. - Parameters:
- conversationIdentifiers- A list of conversation identifiers specifying the conversations to retrieve.
- callback- A callback for the result of the conversation retrieval, containing the list of conversation objects or error information.
- Since:
- 5.8.2 
 
 - 
                                        getConversationListabstract void getConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback) Retrieves the local conversation list of the current user. The returned list includes the following types of conversations: one-to-one chat, group, discussion group, and system conversation. This method reads the conversation list from the local database. The returned conversation list is sorted in chronological order, with pinned conversations appearing at the top. If you need to retrieve other types of conversation lists, you can use getConversationList. This method must be called after the database connection is opened, as indicated by the OnDatabaseOpenedcallback in IRongCoreCallback.ConnectCallback.- Parameters:
- callback- The callback for retrieving the conversation list.
- Since:
- 5.0.0 
 
 - 
                                        getConversationListabstract void getConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes) Retrieves the local conversation list of the current user based on the conversation type. - Parameters:
- callback- The callback for retrieving the conversation list.
- conversationTypes- The types of conversations to retrieve.
- Since:
- 5.0.0 
 
 - 
                                        getTopConversationListabstract void getTopConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes) Retrieves the list of pinned conversations based on the conversation type. - Parameters:
- callback- The callback that returns the list of pinned conversations.
- conversationTypes- The types of pinned conversations to retrieve.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadConversationListabstract void getUnreadConversationList(IRongCoreCallback.ResultCallback<List<Conversation>> callback, Array<ConversationType> conversationTypes) Retrieves the list of unread local conversations for the current user based on the conversation type. - Parameters:
- callback- The callback for retrieving the conversation list.
- conversationTypes- The types of conversations to retrieve.
- Since:
- 5.3.2 
 
 - 
                                        getConversationListByPageabstract void getConversationListByPage(IRongCoreCallback.ResultCallback<List<Conversation>> callback, long timeStamp, int count, Array<ConversationType> conversationTypes) Retrieves the conversation list in a paginated manner. - Parameters:
- callback- Callback to handle the retrieved conversation list.
- timeStamp- Timestamp in milliseconds.
- count- Number of conversations to retrieve.
- conversationTypes- Types of conversations to retrieve.
- Since:
- 5.0.0 
 
 - 
                                        getConversationListByPageabstract void getConversationListByPage(IRongCoreCallback.ResultCallback<List<Conversation>> callback, long timeStamp, int count, boolean topPriority, Array<ConversationType> conversationTypes) Fetches the conversation list with pagination. - Parameters:
- callback- The callback for retrieving the conversation list.
- timeStamp- The timestamp in milliseconds.
- count- The number of conversations to retrieve.
- topPriority- Whether to prioritize pinned messages (determines the sorting of the query results.
- conversationTypes- The types of conversations to retrieve.
- Since:
- 5.6.9 
 
 - 
                                        getConversationNotificationStatusabstract void getConversationNotificationStatus(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<ConversationNotificationStatus> callback) Retrieves the message notification status for a conversation. Note: Not supported for chatrooms! - Parameters:
- conversationType- The type of conversation.
- targetId- The conversation ID.
- callback- Callback to retrieve the message notification status.
- Since:
- 5.0.0 
 
 - 
                                        setConversationNotificationStatusabstract void setConversationNotificationStatus(ConversationType conversationType, String targetId, ConversationNotificationStatus notificationStatus, IRongCoreCallback.ResultCallback<ConversationNotificationStatus> callback) Sets the message notification status for a conversation. Note: Chatrooms are not supported! - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- notificationStatus- The message notification status to set for the conversation .
- callback- The callback for setting the status.
- Since:
- 5.0.0 
 
 - 
                                        getConversationsFromTagByPageabstract void getConversationsFromTagByPage(String tagId, long ts, int count, IRongCoreCallback.ResultCallback<List<Conversation>> callback) Paginate and retrieve the conversation list under a specified local tag. - Parameters:
- tagId- The ID of the tag.
- ts- The timestamp of the last message in the conversation.
- count- The number of conversations to retrieve- 20<= count <=100.
- callback- The callback for paginating and retrieving the conversation list under the specified local tag.
- Since:
- 5.1.1 
 
 - 
                                        getConversationTopStatusabstract void getConversationTopStatus(String targetId, ConversationType conversationType, IRongCoreCallback.ResultCallback<Boolean> callback) Retrieves the pinned status of a conversation. Ensure to set the setConversationStatusListener listener to update the pinned status in the onConversationTagChanged callback, guaranteeing the accuracy of the conversation pinning. - Parameters:
- targetId- The ID of the conversation.
- conversationType- The type of the conversation.
- callback- The callback for the result of the conversation pinning.
- Since:
- 5.1.5 
 
 - 
                                        getUnreadCountabstract void getUnreadCount(String targetId, ConversationType conversationType, Array<String> objectNames, IRongCoreCallback.ResultCallback<Integer> callback) Retrieves the count of unread messages of the specified message types in the specified conversation (excluding chatroom conversations). - Parameters:
- targetId- The target ID of the conversation.
- conversationType- The type of the conversation.
- objectNames- An array of message types.
- callback- The callback for the unread count result.
- Since:
- 5.1.5 
 
 - 
                                        getConversationTopStatusInTagabstract void getConversationTopStatusInTag(ConversationIdentifier conversationIdentifier, String tagId, IRongCoreCallback.ResultCallback<Boolean> callback) Retrieves the pinned status of a tag in a specified conversation (not supported for ultra groups) - Parameters:
- conversationIdentifier- ConversationIdentifier
- tagId- tag id
- callback- Callback to retrieve all tags in the specified conversation
- Since:
- 5.1.1 
 
 - 
                                        getCurrentConnectionStatusabstract IRongCoreListener.ConnectionStatusListener.ConnectionStatus getCurrentConnectionStatus() Retrieves the current connection status of the IM service. - Returns:
- The current connection status . 
- Since:
- 5.0.0 
 
 - 
                                        getCurrentUserIdabstract String getCurrentUserId() Retrieve the information of the currently connected user. - Returns:
- The information of the currently connected user. 
- Since:
- 5.1.4 
 
 - 
                                        getDeltaTimeabstract long getDeltaTime() Gets the time difference between local time and server time. After a message is successfully sent, the SDK synchronizes time with the server. The time stored in the message database is the server time. System.currentTimeMillis() - getDeltaTime() can be used to get the current server time. - Returns:
- The difference between local time and server time. 
- Since:
- 5.0.0 
 
 - 
                                        getDownloadInfoabstract void getDownloadInfo(String tag, IRongCoreCallback.ResultCallback<DownloadInfo> callback) Retrieves media file download information. Note: This method is only applicable for resumable downloads. - Parameters:
- tag- The unique identifier for the file.
- callback- The callback.
- Since:
- 5.1.2 
 
 - 
                                        getGIFLimitSizeabstract int getGIFLimitSize() Gets the maximum allowed size for sending GIF images. - Returns:
- Returns the maximum allowed size for sending GIF images in KB. Returns -1 if the operation fails. 
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessagesabstract void getHistoryMessages(ConversationType conversationType, String targetId, int oldestMessageId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves the latest message entities of the specified message type, before the specified message, and in the specified quantity from the conversation. - Parameters:
- conversationType- The conversation type.
- targetId- The conversation ID.
- oldestMessageId- The ID of the last message.
- count- The number of messages to retrieve.
- callback- The callback for retrieving historical messages, sorted in chronological order from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessagesabstract void getHistoryMessages(ConversationType conversationType, String targetId, List<String> objectNames, long timestamp, int count, RongCommonDefine.GetMessageDirection direction, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves a list of messages in the conversation that meet the specified criteria. For example, to get the 10 image and text messages before the message with messageId 22, the objectNames would be a List of strings: objectNames.add(RC:ImgMsg); objectNames.add(RC:TxtMsg);The corresponding parameters would be: getHistoryMessages(conversationType, targetId, objectNames, 22, 10, true, resultCallback). - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- objectNames- A List of message type identifiers.
- timestamp- The timestamp of the current message.
- count- The number of messages to retrieve.
- direction- The direction of the messages to retrieve relative to the current message RongCommonDefine.GetMessageDirection.
- callback- The callback for retrieving historical messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessagesabstract void getHistoryMessages(ConversationType conversationType, String targetId, String objectName, int baseMessageId, int count, RongCommonDefine.GetMessageDirection direction, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves a list of messages that meet the specified criteria in the conversation. For example, to retrieve the 10 image messages before the message with messageId 22, the corresponding parameters would be: getHistoryMessages(conversationType, targetId, RC:ImgMsg, 22, 10, true, resultCallback).Note: The SDK clears the chatroom's historical messages when exiting the chatroom, so retrieving chatroom history after exiting will return an empty list. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- objectName- The message type identifier.
- baseMessageId- The starting message ID.
- count- The number of messages to retrieve.
- direction- The direction of the messages relative to the baseMessageId Using the specified baseMessageId as the starting point, messages earlier than baseMessageId are FRONT, and messages later are BEHIND.
- callback- The callback for retrieving historical messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessagesabstract void getHistoryMessages(ConversationType conversationType, String targetId, String objectName, int oldestMessageId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves a list of messages that meet the specified criteria in the conversation. The returned messages do not include the message corresponding to oldestMessageId. If the number of messages in the conversation is less than the value of the count parameter, all messages in the conversation will be returned. For example, if oldestMessageId is 10 and count is 2, the method will return a list of Message objects with messageId 9 and 8.Note: The SDK clears the chatroom's historical messages when exiting the chatroom. Therefore, when retrieving historical messages after exiting, the returned list will be empty. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- objectName- The message type identifier.
- oldestMessageId- The ID of the last message.
- count- The number of messages to retrieve.
- callback- The callback for retrieving historical messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessagesabstract void getHistoryMessages(ConversationType conversationType, String targetId, long sentTime, int before, int after, IRongCoreCallback.ResultCallback<List<Message>> resultCallback) Searches for a specified number of messages before and after a given message in a conversation. The returned message list includes the specified message. Messages are ordered from newest to oldest. - Parameters:
- conversationType- The type of the specified conversation.
- targetId- The ID of the specified conversation.
- sentTime- The send time of the specified message, which cannot be 0.
- before- The number of messages before the specified message.
- after- The number of messages after the specified message.
- resultCallback- Callback for the search results.
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessages@Deprecated() abstract List<Message> getHistoryMessages(ConversationType conversationType, String targetId, String objectName, int oldestMessageId, int count) Retrieves a list of messages in the conversation that meet the specified criteria. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- objectName- The identifier for the message type.
- oldestMessageId- The ID of the last message, used to fetch the previous `count` messages.
- count- The number of messages to retrieve.
- Returns:
- A list of historical messages, ordered from newest to oldest. 
- Since:
- 5.0.0 
 
 - 
                                        getHistoryMessages@Deprecated() abstract List<Message> getHistoryMessages(ConversationType conversationType, String targetId, int oldestMessageId, int count) Retrieves a list of messages in the conversation that meet the specified criteria. For example, to get the 10 image and text messages before the message with messageId 22, where objectNames is a List of strings: objectNames.add(RC:ImgMsg); objectNames.add(RC:TxtMsg);The corresponding parameters would be: getHistoryMessages(conversationType, targetId, objectNames, 22, 10, true, resultCallback). - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- oldestMessageId- The ID of the last message.
- count- The number of messages to retrieve.
- Returns:
- A list of historical messages, sorted from newest to oldest. 
- Since:
- 5.0.0 
 
 - 
                                        getLatestMessagesabstract void getLatestMessages(ConversationType conversationType, String targetId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback) Fetches the latest messages from the specified conversation. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- count- The number of messages to retrieve.
- callback- The callback for fetching the latest messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getMessageabstract void getMessage(int messageId, IRongCoreCallback.ResultCallback<Message> callback) Retrieves the message body based on the message ID (unique value in the database index). - Parameters:
- messageId- The message ID.
- callback- The callback.
- Since:
- 5.0.0 
 
 - 
                                        getMessageByUidabstract void getMessageByUid(String uid, IRongCoreCallback.ResultCallback<Message> callback) Retrieves the message entity by its globally unique ID. - Parameters:
- uid- The globally unique ID (server message unique ID).
- callback- The callback for retrieving the message.
- Since:
- 5.0.0 
 
 - 
                                        getMessageCountabstract void getMessageCount(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Integer> callback) Retrieves the total number of messages in the specified conversation. - Parameters:
- conversationType- The type of conversation.
- targetId- The ID of the conversation.
- callback- Callback for the total number of messages.
- Since:
- 5.0.0 
 
 - 
                                        getMessagesabstract void getMessages(ConversationType conversationType, String targetId, HistoryMessageOption historyMsgOption, IRongCoreCallback.IGetMessageCallback callback) Retrieves the history messages of a specified conversation. This method first attempts to fetch history messages from the local storage. If there are missing messages locally, it synchronizes the missing parts from the server. If the synchronization from the server fails, a non-zero errorCode is returned, and the locally available messages are still provided via the callback. The historical message cloud storage feature must be enabled. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- historyMsgOption- HistoryMessageOption
- callback- The callback for retrieving messages.
- Since:
- 5.1.2 
 
 - 
                                        getNotificationQuietHoursabstract void getNotificationQuietHours(IRongCoreCallback.GetNotificationQuietHoursCallback callback) Retrieves the Do Not Disturb time for message notifications. - Parameters:
- callback- Callback for the Do Not Disturb time of message notifications.
- Since:
- 5.0.0 
 
 - 
                                        getOfflineMessageDurationabstract void getOfflineMessageDuration(IRongCoreCallback.ResultCallback<String> callback) Retrieves the offline message storage duration (in days). - Parameters:
- callback- Callback to retrieve the offline message storage duration
- Since:
- 5.0.0 
 
 - 
                                        getPushContentShowStatusabstract void getPushContentShowStatus(IRongCoreCallback.ResultCallback<Boolean> callback) Retrieves the setting for displaying detailed content of remote push notifications. - Parameters:
- callback- Callback to retrieve whether to display detailed content of remote push notifications,- trueto display detailed content,- falseto hide detailed content.
- Since:
- 5.0.0 
 
 - 
                                        getPushLanguageabstract void getPushLanguage(IRongCoreCallback.ResultCallback<IRongCoreEnum.PushLanguage> callback) Retrieves the remote push notification language settings. - Parameters:
- callback- Callback for retrieving the remote push notification language settings, IRongCoreEnum.PushLanguage.
- Since:
- 5.0.0 
 
 - 
                                        getPushReceiveStatusabstract void getPushReceiveStatus(IRongCoreCallback.ResultCallback<Boolean> callback) Retrieves the setting for whether to receive remote push notifications. Prerequisite: When the mobile device is offline and the Web or MAC/PC terminal is online, this setting determines whether the mobile device receives remote push notifications. - Parameters:
- callback- Callback to retrieve the setting for receiving remote push notifications.
- Since:
- 5.0.0 
 
 - 
                                        getRemoteHistoryMessagesabstract void getRemoteHistoryMessages(ConversationType conversationType, String targetId, long dateTime, int count, IRongCoreCallback.ResultCallback<List<Message>> callback) Fetches historical messages from the server before a specified time. Unlike getHistoryMessages, this interface pulls messages from the RongCloud server. After pulling messages from the server, the client performs deduplication and returns the deduplicated data. This is typically used to fetch historical messages after switching to a new device. When using this, it is recommended to first pull historical messages from the local database via getHistoryMessages. If no historical messages are found in the local database, then use this interface to fetch server historical messages, passing the timestamp of the earliest message in the local database.Note: 1. This feature requires enabling the historical message cloud storage function in the RCdeveloper console. 2. If the messages to be fetched already exist in the local database, this interface will not return any data. - Parameters:
- conversationType- The type of conversation.
- targetId- The target conversation ID.
- dateTime- The starting point for fetching messages.
- count- The number of messages to fetch,- 0 < count <= 20.
- callback- The callback for fetching historical messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getRemoteHistoryMessagesabstract void getRemoteHistoryMessages(ConversationType conversationType, String targetId, RemoteHistoryMsgOption remoteHistoryMsgOption, IRongCoreCallback.ResultCallback<List<Message>> callback) Fetches remote history messages for a specified conversation. This feature requires the message cloud storage function to be enabled in the RongCloud Developer Console.Note: Chatrooms are not supported! - Parameters:
- conversationType- Specifies the conversation type.
- targetId- The conversation ID.
- remoteHistoryMsgOption- Configurable parameters RemoteHistoryMsgOption
- callback- Callback for retrieving history messages, ordered from newest to oldest.
- Since:
- 5.0.0 
 
 - 
                                        getSendTimeByMessageIdabstract long getSendTimeByMessageId(int messageId) Retrieves the send time of a message based on its message ID. - Parameters:
- messageId- The specified message ID.
- Returns:
- The time when the message was successfully sent. 
- Since:
- 5.0.0 
 
 - 
                                        getTagsabstract void getTags(IRongCoreCallback.ResultCallback<List<TagInfo>> callback) Get user tags - Parameters:
- callback- Callback for retrieving user tags
- Since:
- 5.1.1 
 
 - 
                                        getTagsFromConversationabstract void getTagsFromConversation(ConversationIdentifier conversationIdentifier, IRongCoreCallback.ResultCallback<List<ConversationTagInfo>> callback) Retrieves all tags under the specified conversation - Parameters:
- conversationIdentifier- ConversationIdentifier
- callback- Callback for retrieving all tags under the specified conversation
- Since:
- 5.1.1 
 
 - 
                                        getTextMessageDraftabstract void getTextMessageDraft(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<String> callback) Retrieves the draft information from a conversation. - Parameters:
- conversationType- The type of the conversation.
- targetId- The ID of the conversation.
- callback- The callback to retrieve the draft text content.
- Since:
- 5.0.0 
 
 - 
                                        getTheFirstUnreadMessageabstract void getTheFirstUnreadMessage(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Message> callback) Get the first unread message. - Parameters:
- conversationType- Specifies the conversation type.
- targetId- Indicates the conversation ID.
- callback- Represents the callback function.
- Since:
- 5.0.0 
 
 - 
                                        getTopForegroundActivity@Deprecated() abstract Activity getTopForegroundActivity() Retrieves the topmost Activity in the foreground. - Returns:
- Returns the topmost Activity if the application is in the foreground; returns NULL if the application is in the background. 
- Since:
- 5.0.0 
 
 - 
                                        getTotalUnreadCountabstract void getTotalUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback) Get the total count of unread messages across all conversations. Note: This does not include chatrooms; chatroom messages are not counted. - Parameters:
- callback- Callback for the unread message count.
- Since:
- 5.0.0 
 
 - 
                                        getTotalUnreadCountabstract void getTotalUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback, Array<Conversation> conversations) Retrieves the total count of unread messages for all specified conversations. Note: Chatroom messages are not included in the count. - Parameters:
- callback- Callback to retrieve the total unread count for specified conversations.
- conversations- Specified conversations.
- Since:
- 5.0.0 
 
 - 
                                        getTypingUserListFromConversationabstract Collection<TypingStatus> getTypingUserListFromConversation(ConversationType conversationType, String targetId) Get the list of users currently typing in the conversation - Parameters:
- conversationType- The type of conversation
- targetId- The ID of the conversation
- Returns:
- The list of users currently typing in the conversation 
- Since:
- 5.0.0 
 
 - 
                                        getUnreadCountabstract void getUnreadCount(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Integer> callback) Retrieves the count of unread messages for the specified conversation. Note: Chatroom messages are not included in the count. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- callback- Callback for the unread message count.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadCountabstract void getUnreadCount(Array<ConversationType> conversationTypes, boolean containBlocked, IRongCoreCallback.ResultCallback<Integer> callback) Retrieves the total count of unread messages for specified conversation types. Note: Chatroom messages are not included in the count. - Parameters:
- conversationTypes- Array of conversation types Conversation.
- containBlocked- Indicates whether to include unread messages from muted conversations.
- callback- Callback for the unread message count.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadCountabstract void getUnreadCount(Array<ConversationType> conversationTypes, IRongCoreCallback.ResultCallback<Integer> callback) Retrieves the total count of unread messages for specified conversation types. Note: Chatroom messages are not included in the count. - Parameters:
- conversationTypes- Array of conversation types Conversation.
- callback- Callback for the unread message count.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadCountabstract void getUnreadCount(IRongCoreCallback.ResultCallback<Integer> callback, Array<ConversationType> conversationTypes) Retrieves the total count of unread messages for specified conversation types. Note: Chatroom messages are not included in the count. - Parameters:
- callback- Callback for the unread message count.
- conversationTypes- Conversation types.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadMentionedMessagesabstract void getUnreadMentionedMessages(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves unread mention messages in a conversation. - Parameters:
- conversationType- Specifies the type of conversation.
- targetId- Represents the conversation ID.
- callback- Callback for retrieving unread mention messages.
- Since:
- 5.0.0 
 
 - 
                                        getUnreadMentionedMessagesabstract void getUnreadMentionedMessages(ConversationType conversationType, String targetId, int count, boolean desc, IRongCoreCallback.ResultCallback<List<Message>> callback) Retrieves unread mention messages in a conversation. - Parameters:
- conversationType- Specifies the type of conversation.
- targetId- Represents the conversation ID.
- count- Maximum number of- @messages.
- desc-- truefetches the latest- countpieces of data, and- falsefetches the oldest- countpieces of data.
- callback- Callback for getting unread- @messages.
- Since:
- 5.2.5 
 
 - 
                                        getVendorTokenabstract void getVendorToken(IRongCoreCallback.ResultCallback<String> resultCallback) Retrieves the authentication information of the logged-in user. Third-party vendors use this interface to obtain a token, which is then used along with the vendor's registration information for authentication with the RCserver. - Parameters:
- resultCallback- The request callback.
- Since:
- 5.0.0 
 
 - 
                                        getVideoLimitTimeabstract int getVideoLimitTime() Retrieves the maximum allowed duration for sending video files. - Returns:
- Returns the maximum allowed duration in seconds for sending video files. Returns -1 if the retrieval fails. 
- Since:
- 5.0.0 
 
 - 
                                        insertIncomingMessageabstract void insertIncomingMessage(ConversationType type, String targetId, String senderUserId, ReceivedStatus receivedStatus, MessageContent content, IRongCoreCallback.ResultCallback<Message> resultCallback) Inserts a message into the local conversation with the direction set as received. This message is only inserted into the local conversation and will not be sent to the server or the recipient. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise the callback RC_INVALID_PARAMETER_MSG_TAG will be triggered. - Parameters:
- type- The type of the conversation.
- targetId- The ID of the conversation.
- senderUserId- The ID of the sender.
- receivedStatus- The received status Message.
- content- The content of the message, such as TextMessage, ImageMessage, etc.
- resultCallback- The callback to obtain the message sending entity.
- Since:
- 5.0.0 
 
 - 
                                        insertIncomingMessageabstract void insertIncomingMessage(ConversationType type, String targetId, String senderUserId, ReceivedStatus receivedStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback) Inserts a message into the local conversation with the direction set as received. This message is only inserted into the local conversation and will not be actually sent to the server or the other party. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise, the callback RC_INVALID_PARAMETER_MSG_TAG will be triggered. - Parameters:
- type- The type of the conversation.
- targetId- The ID of the conversation.
- senderUserId- The ID of the sender.
- receivedStatus- The received status Message.
- content- The content of the message, such as TextMessage, ImageMessage, etc.
- sentTime- The sent time of the message getSentTime.
- resultCallback- The callback to obtain the message sending entity.
- Since:
- 5.0.0 
 
 - 
                                        insertOutgoingMessageabstract void insertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, IRongCoreCallback.ResultCallback<Message> resultCallback) Inserts a message into the local conversation. This message is only inserted into the local conversation and will not be sent to the server or the recipient. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise, the callback RC_INVALID_PARAMETER_MSG_TAG will be triggered. - Parameters:
- type- The conversation type.
- targetId- The conversation ID.
- sentStatus- The sending status Message.
- content- The message content.
- resultCallback- The callback to obtain the message sending entity.
- Since:
- 5.0.0 
 
 - 
                                        insertOutgoingMessageabstract void insertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback) Inserts a message into the local conversation with the direction set to sent. This message is only inserted into the local conversation and will not be actually sent to the server or the recipient. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise the callback RC_INVALID_PARAMETER_MSG_TAG will be triggered. - Parameters:
- type- The type of the conversation.
- targetId- The ID of the conversation.
- sentStatus- The sending status Message.
- content- The message content, such as TextMessage, ImageMessage, etc.
- sentTime- The sending time of the message getSentTime.
- resultCallback- The callback to obtain the message sending entity.
- Since:
- 5.0.0 
 
 - 
                                        isFileDownloadingabstract boolean isFileDownloading(Object uid) Checks whether the file is currently being downloaded. Note: This method is only applicable for resumable downloads. - Parameters:
- uid- The file UID, which uniquely identifies the file
- Returns:
- Indicates whether the file is currently being downloaded 
- Since:
- 5.1.2 
 
 - 
                                        pauseDownloadMediaFileabstract void pauseDownloadMediaFile(String fileUniqueId, IRongCoreCallback.OperationCallback callback) Pauses the download of a multimedia file. - Parameters:
- fileUniqueId- The unique identifier of the file.
- callback- The callback triggered when the download is paused.
- Since:
- 5.0.0 
 
 - 
                                        pauseDownloadMediaMessageabstract void pauseDownloadMediaMessage(Message message, IRongCoreCallback.OperationCallback callback) Pauses the download of a multimedia message. - Parameters:
- message- The multimedia file message.
- callback- The callback triggered when the download is paused.
- Since:
- 5.0.0 
 
 - 
                                        recallMessageabstract void recallMessage(Message message, String pushContent, IRongCoreCallback.ResultCallback<RecallNotificationMessage> callback) Recall message - Parameters:
- message- The message to be recalled
- pushContent- When sending a push notification, this field will be displayed in the notification bar.
- callback- The RecallNotificationMessage is returned in the onSuccess callback.
- Since:
- 5.0.0 
 
 - 
                                        removeConversationabstract void removeConversation(ConversationType conversationType, String targetId, IRongCoreCallback.ResultCallback<Boolean> callback) Removes a conversation from the conversation list. This method does not delete messages within the conversation. If new messages are received in this conversation, the conversation will reappear in the conversation list and display the most recent history messages. - Parameters:
- conversationType- The type of the conversation Conversation.
- targetId- The ID of the conversation.
- callback- Callback indicating whether the removal was successful, of type Boolean,- ResultCallback<Boolean>.
- Since:
- 5.0.0 
 
 - 
                                        removeConversationsFromTagabstract void removeConversationsFromTag(String tagId, List<ConversationIdentifier> conversationIdentifierList, IRongCoreCallback.OperationCallback callback) Deletes conversations from a specified tag - Parameters:
- tagId- The ID of the tag
- conversationIdentifierList- The list of conversations
- callback- Callback for deleting conversations from the specified tag
- Since:
- 5.1.1 
 
 - 
                                        removeFromBlacklistabstract void removeFromBlacklist(String userId, IRongCoreCallback.OperationCallback callback) Removes a user from the blocklist. - Parameters:
- userId- The user ID.
- callback- Callback for blocklist removal.
- Since:
- 5.0.0 
 
 - 
                                        removeMessageExpansionabstract void removeMessageExpansion(List<String> keyArray, String messageUId, IRongCoreCallback.OperationCallback callback) Deletes specific key-value pairs from the message extension information - Parameters:
- keyArray- List of keys to be deleted from the message extension information, type is ArrayList
- messageUId- The messageUId of the message
- callback- Callback for deleting message extension information
- Since:
- 5.0.0 
 
 - 
                                        removeNotificationQuietHoursabstract void removeNotificationQuietHours(IRongCoreCallback.OperationCallback callback) Remove the Do Not Disturb time for message notifications. - Parameters:
- callback- Callback for removing the Do Not Disturb time for message notifications.
- Since:
- 5.0.0 
 
 - 
                                        removeTagabstract void removeTag(String tagId, IRongCoreCallback.OperationCallback callback) Remove tag - Parameters:
- tagId- Unique identifier of the tag, string type, with a maximum length of 10 characters
- callback- Callback for tag removal
- Since:
- 5.1.1 
 
 - 
                                        removeTagsFromConversationabstract void removeTagsFromConversation(ConversationIdentifier conversationIdentifier, List<String> tagIds, IRongCoreCallback.OperationCallback callback) Removes specified tags from a conversation - Parameters:
- conversationIdentifier- ConversationIdentifier
- tagIds- List of tag IDs
- callback- Callback for removing specified tags from a conversation
- Since:
- 5.1.1 
 
 - 
                                        saveTextMessageDraftabstract void saveTextMessageDraft(ConversationType conversationType, String targetId, String content, IRongCoreCallback.ResultCallback<Boolean> callback) Saves draft information for a conversation. - Parameters:
- conversationType- The type of the conversation.
- targetId- The ID of the conversation.
- content- The text content of the draft.
- callback- Callback indicating whether the save operation was successful.
- Since:
- 5.0.0 
 
 - 
                                        searchConversationsabstract void searchConversations(String keyword, Array<ConversationType> conversationTypes, Array<String> objectNames, IRongCoreCallback.ResultCallback<List<SearchConversationResult>> resultCallback) Search conversations based on keywords. This method quickly returns a list of matched conversations, including the count of matched messages in each conversation. Use getMatchCount to retrieve this count.Note: To ensure custom messages are searchable, implement the getSearchableWord method in your custom message class. - Parameters:
- keyword- The keyword to search for.
- conversationTypes- The types of conversations to search.
- objectNames- The types of messages to search, e.g., RC:TxtMsg.
- resultCallback- Callback for search results.
- Since:
- 5.0.0 
 
 - 
                                        searchMessagesabstract void searchMessages(ConversationType conversationType, String targetId, String keyword, int count, long beginTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback) Searches for messages in a specified conversation based on a keyword. Note: To enable custom messages to be searchable, implement the getSearchableWord method in your custom message class. - Parameters:
- conversationType- Specifies the conversation type.
- targetId- Specifies the conversation ID.
- keyword- The keyword to search for.
- count- The number of search results to return.
- beginTime- Specifies the timestamp to start searching from.
- resultCallback- Callback for handling search results.
- Since:
- 5.0.0 
 
 - 
                                        searchMessagesabstract void searchMessages(ConversationType conversationType, String targetId, String keyword, long startTime, long endTime, int offset, int limit, IRongCoreCallback.ResultCallback<List<Message>> resultCallback) Searches for messages in a specified conversation within a given time range based on keywords. Note: To make custom messages searchable, implement the getSearchableWord method in your custom message class. - Parameters:
- conversationType- Specifies the conversation type.
- targetId- Specifies the conversation ID.
- keyword- The keyword to search for.
- startTime- The start time of the search range.
- endTime- The end time of the search range.
- offset- The offset for pagination.
- limit- The maximum number of search results to return.
- resultCallback- Callback for the search results.
- Since:
- 5.1.2 
 
 - 
                                        searchMessagesabstract void searchMessages(ConversationIdentifier conversationIdentifier, String keyword, Array<String> objectNameList, int limit, long startTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback) Searches for local historical messages of specified message types in a specific conversation based on keywords. This method allows applications to search for messages within a specific conversation based on criteria such as keywords, object name lists, and time range. The search results are returned via a callback. - Parameters:
- conversationIdentifier- The conversation type and conversation ID.
- keyword- The keyword to search for (non-empty).
- objectNameList- An array of message types, supporting multiple types (e.g., text: RC:TxtMsg).
- limit- The maximum number of messages to query [maximum 100; if exceeded, 100 is used].
- startTime- The timestamp to search for messages before this time (pass 0 to start searching from the latest message), in milliseconds.
- resultCallback- The callback interface for search results.
- Since:
- 5.8.1 
 
 - 
                                        searchMessagesByUserabstract void searchMessagesByUser(ConversationType conversationType, String targetId, String userId, int count, long beginTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback) Searches for messages in a specified conversation based on the user ID. Note: To ensure custom messages are searchable, implement the getSearchableWord method in your custom message class. - Parameters:
- conversationType- The type of the specified conversation.
- targetId- The ID of the specified conversation.
- userId- The user ID.
- count- The number of search results to return (- 0 < count <= 100).
- beginTime- The start time for the search query.
- resultCallback- Callback for the search results.
- Since:
- 5.0.0 
 
 - 
                                        sendDirectionalMediaMessageabstract void sendDirectionalMediaMessage(Message message, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallback callback) Sends a targeted multimedia message. Sends a message to specific users in a conversation; other users in the conversation will not receive the message. Before sending, construct a Message entity where the content must be a multimedia message. For example: ImageMessage, FileMessage, or any other message that inherits from MediaMessageContent. Starting from version 5.6.9, ultra group conversation types are supported. - Parameters:
- message- The message entity to be sent.
- userIds- An array of targeted recipient IDs.
- pushContent- This field is displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message .
- Since:
- 5.0.0 
 
 - 
                                        sendDirectionalMessageabstract void sendDirectionalMessage(ConversationType type, String targetId, MessageContent content, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback) Sends a targeted message. This method is used to send a message to specific users within a group or ultra group, while other users will not receive this message. The message status and message body are returned through the methods in IRongCoreCallback.ISendMessageCallback. This method can only send non-multimedia messages. For multimedia messages such as , FileMessage, or any other messages inherited from , use sendDirectionalMediaMessage. If you are using IMLib, you can use this method to send targeted messages. Starting from version 5.6.9, ultra group conversation types are supported. - Parameters:
- type- The conversation type.
- targetId- The conversation ID, which could be a group ID or ultra group ID.
- content- The message content, such as TextMessage, ImageMessage.
- userIds- The list of users in the discussion group or group conversation who will receive this message.
- pushContent- When sending a remote push notification, this field will be displayed in the notification bar.
- pushData- Additional information for the remote push notification.
- callback- The callback for sending the message, refer to .
- Since:
- 5.0.0 
 
 - 
                                        sendDirectionalMessageabstract void sendDirectionalMessage(Message message, Array<String> userIds, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback) Sends a targeted message. This method is used to send a message to specific users within a group or ultra group, while other users will not receive this message. The message status and body are returned through the methods in IRongCoreCallback.ISendMessageCallback. This method can only send non-multimedia messages. For multimedia messages such as , FileMessage, or other messages inheriting from , use sendDirectionalMediaMessage. If you are using IMLib, you can use this method to send targeted messages. Starting from version 5.6.9, ultra group conversation types are supported. - Parameters:
- message- The message object to be sent.
- userIds- The list of users in the discussion group or group who will receive this message.
- pushContent- When a remote push notification is sent, this field will be displayed in the notification bar.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message, refer to .
- Since:
- 5.2.3 
 
 - 
                                        sendDirectionalMessageabstract void sendDirectionalMessage(ConversationType type, String targetId, MessageContent content, Array<String> userIds, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback) Sends a targeted message. This method is used to send a message to specific users within a group or ultra group, while other users will not receive this message. The message status and body are returned through the methods in IRongCoreCallback.ISendMessageCallback. This method can only send non-multimedia messages. For multimedia messages such as , FileMessage, or other messages inherited from , use sendDirectionalMediaMessage. If you are using IMLib, you can use this method to send targeted messages. Starting from version 5.6.9, ultra group conversation types are supported. - Parameters:
- type- The conversation type.
- targetId- The conversation ID, which could be a group ID or ultra group ID.
- content- The message content, such as TextMessage, ImageMessage.
- userIds- The list of users in the discussion group or group conversation who will receive this message.
- pushContent- When sending a remote push notification, this field will be displayed in the notification bar.
- pushData- Additional information for the remote push notification.
- option- Additional options for sending the message.
- callback- The callback for sending the message, refer to .
- Since:
- 5.1.2 
 
 - 
                                        sendDirectionalMessageabstract void sendDirectionalMessage(Message message, Array<String> userIds, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback) Sends a targeted message. This method is used to send a message to specific users in a group or ultra group, while other users will not receive this message. The message status and message body are returned through the methods in IRongCoreCallback.ISendMessageCallback. This method can only send non-multimedia messages. For multimedia messages such as , FileMessage, or other messages that inherit from , you must call sendDirectionalMediaMessage. If you are using IMLib, you can use this method to send targeted messages; Starting from version 5.6.9, ultra group conversation types are supported. - Parameters:
- message- The message object to be sent.
- userIds- The list of users in the discussion group or group who will receive this message.
- pushContent- This field will be displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- option- Additional options for sending the message.
- callback- The callback for sending the message, refer to .
- Since:
- 5.2.3 
 
 - 
                                        sendImageMessageabstract void sendImageMessage(ConversationType type, String targetId, MessageContent content, String pushContent, String pushData, IRongCoreCallback.SendImageMessageCallback callback) Sends an image message. If you are using IMLib, you can use this method to send an image message. - Parameters:
- type- The conversation type.
- targetId- The conversation ID.
- content- The message content, such as TextMessage, ImageMessage.
- pushContent- When a remote push notification is sent, this field will be displayed in the notification bar.
- pushData- Additional information for the remote push notification.
- callback- The callback for sending the message.
- Since:
- 5.0.0 
 
 - 
                                        sendImageMessageabstract void sendImageMessage(Message message, String pushContent, String pushData, IRongCoreCallback.SendImageMessageCallback callback) Sends an image message. If you are using IMLib, you can use this method to send an image message. - Parameters:
- message- The message entity to be sent.
- pushContent- When sending a remote push notification, this field will be displayed in the notification bar.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message.
- Since:
- 5.0.0 
 
 - 
                                        sendImageMessageabstract void sendImageMessage(Message message, String pushContent, String pushData, IRongCoreCallback.SendImageMessageWithUploadListenerCallback callback) Sends an image message and uploads the image to your own server. This method uploads the image to your own server for sending and updates the image status. When using this method to upload an image, it will trigger the callback, which carries the IRongCoreListener.UploadImageStatusListener object. Users only need to call the following methods:update to update the progress,success to update the success status and provide the uploaded image URL,error to update the failure status. - Parameters:
- message- The message entity to be sent.
- pushContent- When sending a remote push notification, this field will be displayed in the notification bar.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message, which carries the object.
- Since:
- 5.0.0 
 
 - 
                                        sendMediaMessageabstract void sendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallback callback) Sends a multimedia message. Construct a Message entity before sending. The content in the message entity must be a multimedia message. For example: ImageMessage, FileMessage, or other messages inherited from MediaMessageContent. - Parameters:
- message- The message entity to be sent.
- pushContent- This field will be displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message .
- Since:
- 5.0.0 
 
 - 
                                        sendMediaMessageabstract void sendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallback callback) Sends a multimedia message. Before sending, construct a Message entity where the content must be a multimedia message. For example: ImageMessage, FileMessage, or other messages that inherit from MediaMessageContent. - Parameters:
- message- The message entity to be sent.
- pushContent- This field is displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- option- Additional options for sending the message.
- callback- The callback for sending the message .
- Since:
- 5.4.4 
 
 - 
                                        sendMediaMessageabstract void sendMediaMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback) Sends a multimedia message. This method can be used to upload multimedia files to your own server. When uploading a multimedia file, the onAttached callback is triggered. This callback carries the IRongCoreCallback.MediaMessageUploader object. Users only need to call the following methods in this object: update to update the progress success to update the success status and provide the file URL after successful upload error to update the failure status cancel to update the cancellation status - Parameters:
- message- The message entity to be sent.
- pushContent- This field is displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message, which carries the object.
- Since:
- 5.0.0 
 
 - 
                                        sendMediaMessageabstract void sendMediaMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMediaMessageCallbackWithUploader callback) Sends a multimedia message. This method can be used to upload multimedia files to your own server. When uploading a multimedia file, the callback onAttached is triggered. This callback carries the object. Users only need to call the following methods from this object: update to update the progress success to update the success status and provide the file URL after successful upload error to update the failure status cancel to update the cancellation status - Parameters:
- message- The message entity to be sent.
- pushContent- When sending a remote push notification, this field will be displayed in the notification bar.
- pushData- Additional information for remote push notifications.
- option- Additional options for sending the message.
- callback- The callback for sending the message, which carries the object.
- Since:
- 5.4.4 
 
 - 
                                        sendMessageabstract void sendMessage(ConversationType type, String targetId, MessageContent content, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback) Sends a message based on the conversation type. The message status and message body are returned through the methods in .Note: The message sending rate is limited to 5 messages per second. - Parameters:
- type- The conversation type.
- targetId- The conversation ID.
- content- The message content, such as TextMessage, ImageMessage.
- pushContent- The content displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for remote push notifications.
- callback- The callback for sending the message.
- Since:
- 5.0.0 
 
 - 
                                        sendMessageabstract void sendMessage(Message message, String pushContent, String pushData, IRongCoreCallback.ISendMessageCallback callback) Sends a message. The message status and body are returned via the methods in .Note: You cannot send more than 5 messages per second. - Parameters:
- message- The message body to be sent.
- pushContent- When sending a remote push notification, this field is displayed in the notification bar.
- pushData- Additional information for the remote push notification.
- callback- The callback for sending the message.
- Since:
- 5.0.0 
 
 - 
                                        sendMessageabstract void sendMessage(Message message, String pushContent, String pushData, SendMessageOption option, IRongCoreCallback.ISendMessageCallback callback) Sends a message. The status and body of the sent message are returned via the methods in .Note: The message sending rate is limited to 5 messages per second. - Parameters:
- message- The message body to be sent.
- pushContent- The content displayed in the notification bar when a remote push notification is sent.
- pushData- Additional information for the remote push notification.
- option- Additional options for sending the message.
- callback- The callback for sending the message, refer to .
- Since:
- 5.0.0 
 
 - 
                                        sendPingabstract void sendPing() OEM implements heartbeat alignment by sending Ping interface. 1. Background WakeLock heartbeat 2. RongPush heartbeat - Since:
- 5.0.0 
 
 - 
                                        sendReadReceiptMessage@Deprecated() abstract void sendReadReceiptMessage(ConversationType conversationType, String targetId, long timestamp) Sends a read receipt for messages in a specific conversation. In IMLib, you can register a listener using setReadReceiptListener. - Parameters:
- conversationType- The type of conversation (only applicable to PRIVATE and ENCRYPTED types).
- targetId- The ID of the conversation.
- timestamp- The timestamp of the last read message in the conversation getSentTime.
- Since:
- 5.0.0 
 
 - 
                                        sendReadReceiptMessageabstract void sendReadReceiptMessage(ConversationType conversationType, String targetId, long timestamp, IRongCoreCallback.ISendMessageCallback callback) Sends a read receipt for messages in a specific conversation. For IMLib, you can register a listener using setReadReceiptListener. - Parameters:
- conversationType- The type of conversation (only applicable to PRIVATE and ENCRYPTED types)
- targetId- The ID of the conversation
- timestamp- The sent timestamp of the last read message in the conversation getSentTime
- callback- Callback for sending the read receipt message
- Since:
- 5.0.0 
 
 - 
                                        sendReadReceiptRequestabstract void sendReadReceiptRequest(Message message, IRongCoreCallback.OperationCallback callback) Initiates a read receipt request for a message (only supported for groups and discussion groups). Note: You can only initiate a read receipt request for messages you have sent. - Parameters:
- message- The message for which the read receipt is requested
- callback- The callback function
- Since:
- 5.0.0 
 
 - 
                                        sendReadReceiptResponseabstract void sendReadReceiptResponse(ConversationType type, String targetId, List<Message> messageList, IRongCoreCallback.OperationCallback callback) Send read receipts (only supported for groups and discussion groups) - Parameters:
- type- Conversation type
- targetId- Conversation ID
- messageList- List of messages in the conversation for which read receipts need to be sent
- callback- Callback function
- Since:
- 5.0.0 
 
 - 
                                        sendTypingStatusabstract void sendTypingStatus(ConversationType conversationType, String targetId, String typingContentType) Sends a typing status to the conversation. Currently, only one-to-one chat is supported. - Parameters:
- conversationType- Conversation type
- targetId- Conversation ID
- typingContentType- The type name of the message being typed.
- Since:
- 5.0.0 
 
 - 
                                        setConversationStatusListenerabstract void setConversationStatusListener(IRongCoreListener.ConversationStatusListener listener) Sets up multi-device synchronization for conversation status (pin and Do Not Disturb) listeners. - Parameters:
- listener- The listener for multi-device synchronization of conversation status (pin and Do Not Disturb) ConversationStatusListener
- Since:
- 5.0.0 
 
 - 
                                        setReadReceiptV4Listenerabstract void setReadReceiptV4Listener(IRongCoreListener.ReadReceiptV4Listener listener) 
 - 
                                        setConversationTagListenerabstract void setConversationTagListener(IRongCoreListener.ConversationTagListener listener) Sets up multi-device synchronization monitoring for Tags - Parameters:
- listener- Multi-device synchronization monitoring for Tags
- Since:
- 5.1.1 
 
 - 
                                        setConversationToTopInTagabstract void setConversationToTopInTag(String tagId, ConversationIdentifier conversationIdentifier, boolean isTop, IRongCoreCallback.OperationCallback callback) Set the top status of a conversation in a tag - Parameters:
- tagId- tag id
- conversationIdentifier- ConversationIdentifier
- isTop- Whether to pin the conversation
- callback- Callback for unpinning the conversation in the tag
- Since:
- 5.1.1 
 
 - 
                                        setConversationToTop@Deprecated() abstract void setConversationToTop(ConversationType conversationType, String targetId, boolean isTop, boolean needCreate, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the pinned status of a conversation. If the conversation does not exist, calling this method will automatically create and pin the conversation. - Parameters:
- conversationType- The type of the conversation Conversation.
- targetId- The ID of the conversation.
- isTop- Whether to pin the conversation.
- needCreate- Whether to create the conversation if it does not exist.
- callback- Callback to indicate whether the pinning operation was successful.
- Since:
- 5.0.0 
 
 - 
                                        setConversationToTopabstract void setConversationToTop(ConversationType conversationType, String id, boolean isTop, boolean needCreate, boolean needUpdateTime, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the pinned status of a conversation. If the conversation does not exist, calling this method will automatically create and pin the conversation. - Parameters:
- conversationType- The type of conversation Conversation.
- id- The conversation ID.
- isTop- Whether to pin the conversation.
- needCreate- Whether to create the conversation if it does not exist.
- needUpdateTime- Whether to update the conversation's timestamp.
- callback- Callback indicating whether the pinning operation was successful.
- Since:
- Dedicated Cloud 5.6.2 
 
 - 
                                        setConversationToTopabstract void setConversationToTop(ConversationType conversationType, String targetId, boolean isTop, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the sticky status of a conversation. If the conversation does not exist, calling this method will automatically create the conversation and set it as sticky. - Parameters:
- conversationType- The type of conversation Conversation.
- targetId- The ID of the conversation.
- isTop- Whether to set the conversation as sticky.
- callback- Callback to indicate whether the sticky status was successfully set.
- Since:
- 5.0.0 
 
 - 
                                        setMessageBlockListenerabstract void setMessageBlockListener(IRongCoreListener.MessageBlockListener listener) Sets the listener for blocked messages containing sensitive words. - Parameters:
- listener- The listener for blocked messages.
- Since:
- 5.1.4 
 
 - 
                                        setMessageExpansionListenerabstract void setMessageExpansionListener(IRongCoreListener.MessageExpansionListener listener) Sets the message extension listener - Parameters:
- listener- The message extension listener
- Since:
- 5.0.0 
 
 - 
                                        setMessageExtraabstract void setMessageExtra(int messageId, String value, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the additional information for a local message. This is used to extend the usage scenarios of messages. After setting, messages with additional information can be retrieved via getHistoryMessages.Note: This is only for local use and cannot be synchronized with remote users. - Parameters:
- messageId- The message ID.
- value- The additional information, with a maximum of 1024 bytes.
- callback- Callback indicating whether the setting was successful.
- Since:
- 5.0.0 
 
 - 
                                        setMessageReadTimeabstract void setMessageReadTime(long messageId, long timestamp, IRongCoreCallback.OperationCallback callback) Sets the read timestamp for a message. - Parameters:
- messageId- The ID of the message
- timestamp- The timestamp of the message
- callback- Callback triggered when the message read status is set
- Since:
- 5.0.0 
 
 - 
                                        setMessageReceivedStatusabstract void setMessageReceivedStatus(int messageId, ReceivedStatus receivedStatus, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the message received status. - Parameters:
- messageId- The message ID.
- receivedStatus- The received message status.
- callback- Callback indicating whether the setting was successful.
- Since:
- 5.0.0 
 
 - 
                                        setMessageSentStatusabstract void setMessageSentStatus(Message message, IRongCoreCallback.ResultCallback<Boolean> callback) Sets the message sending status. Note: Users are not allowed to set it to SENDING - Parameters:
- message- The message object.
- callback- Callback indicating whether the setting was successful.
- Since:
- 5.0.0 
 
 - 
                                        setNotificationQuietHoursabstract void setNotificationQuietHours(String startTime, int spanMinutes, IRongCoreCallback.OperationCallback callback) Sets the Do Not Disturb time for message notifications. - Parameters:
- startTime- The start time in the format HH:MM:SS.
- spanMinutes- The duration in minutes from the start time to the end time of the Do Not Disturb period.
- callback- Callback for the Do Not Disturb time setting.
- Since:
- 5.0.0 
 
 - 
                                        setOfflineMessageDurationabstract void setOfflineMessageDuration(int duration, IRongCoreCallback.ResultCallback<Long> callback) Sets the storage duration for offline messages on the server (in days). Note: This feature requires customers to submit a ticket. The method will only take effect after the feature is enabled on the server. - Parameters:
- duration- The compensation time for offline messages, range [1~7 days].
- callback- The callback
- Since:
- 5.0.0 
 
 - 
                                        setOnReceiveDestructionMessageListenerabstract void setOnReceiveDestructionMessageListener(IRongCoreListener.OnReceiveDestructionMessageListener listener) Sets the listener for receiving auto-destroy messages. - Parameters:
- listener- The listener for receiving auto-destroy messages.
- Since:
- 5.0.0 
 
 - 
                                        setPushContentShowStatusabstract void setPushContentShowStatus(boolean showStatus, IRongCoreCallback.OperationCallback callback) Sets whether to display the details of remote push notifications. Note: This feature requires enabling user settings from the server side. - Parameters:
- showStatus- Indicates whether to display the content of remote push notifications.
- callback- The callback function.
- Since:
- 5.0.0 
 
 - 
                                        setPushLanguageabstract void setPushLanguage(IRongCoreEnum.PushLanguage language, IRongCoreCallback.OperationCallback callback) Sets the language for remote push notifications. Currently supports Chinese and English. Prerequisite: The mobile device is offline, while the Web or MAC/PC terminal is online. Determines whether the mobile device receives remote push notifications.Note: This feature requires enabling user settings from the server side. - Parameters:
- language- The language type for remote push notifications, .
- callback- The callback to execute the operation
- Since:
- 5.0.0 
 
 - 
                                        setPushLanguageCodeabstract void setPushLanguageCode(String language, IRongCoreCallback.OperationCallback callback) Sets the natural language for push notification content. - Parameters:
- language- The language environment set via the SDK.
- callback- The callback to execute the operation.
- Since:
- 5.0.0 
 
 - 
                                        setPushNotificationListenerabstract void setPushNotificationListener(IRongCoreListener.PushNotificationListener listener) Sets up a listener for changes in push notification configuration. This method is triggered when server-side configurations, such as push language or whether to display notification details, are changed. The callback is initialized upon the first successful connection. - Parameters:
- listener- The listener for whether to display notification details
- Since:
- 5.1.1 
 
 - 
                                        setPushReceiveStatusabstract void setPushReceiveStatus(boolean receiveStatus, IRongCoreCallback.OperationCallback callback) Sets whether to receive remote notifications. Note: This feature requires enabling user settings from the server side. - Parameters:
- receiveStatus- Indicates whether to receive remote notifications.
- callback- The callback
- Since:
- 5.0.0 
 
 - 
                                        setReconnectKickEnableabstract void setReconnectKickEnable(boolean enable) Sets whether to kick out the reconnecting device during reconnection. If the user has not enabled multi-device login, when the same account logs in on a new device, the account will be kicked out from the previously logged-in device. Due to the SDK's reconnection mechanism, the following scenario may occur: The user logs in on device A, but device A has an unstable network connection and fails to connect. The SDK initiates a reconnection mechanism. Meanwhile, the user logs in on device B, and device B successfully connects. When device A's network stabilizes, the user successfully connects on device A, and device B is kicked out. This interface is designed to address such scenarios. When enableis set totrue, if the SDK detects that another device has successfully connected during reconnection, it will not forcibly kick out the already connected device but instead kick out the reconnecting device.Note: 1. This feature requires submitting a ticket to enable it on the server side before the client-side method takes effect. 2. This method must be called before init.- Parameters:
- enable- Whether to kick out the reconnecting device
- Since:
- 5.0.0 
 
 - 
                                        setRLogFileMaxSizeabstract void setRLogFileMaxSize(long pSize) Sets the size of the business log file, with a default of 1M. The setting takes effect immediately. When the log file exceeds the specified size, it is compressed into a zip file and stored locally. - Parameters:
- pSize- The size of the log file, in bytes.
- Since:
- 5.0.0 
 
 - 
                                        setRLogLevelabstract void setRLogLevel(int pLevel) Sets the console log level. Must be called after initialization. - Parameters:
- pLevel- The log level.
- Since:
- 5.0.0 
 
 - 
                                        setSyncConversationReadStatusListenerabstract void setSyncConversationReadStatusListener(IRongCoreListener.SyncConversationReadStatusListener listener) Sets the listener for multi-device synchronization of conversation read status. - Parameters:
- listener- The listener for multi-device synchronization of conversation read status IRongCoreListener.SyncConversationReadStatusListener.
- Since:
- 5.0.0 
 
 - 
                                        setTagListenerabstract void setTagListener(IRongCoreListener.TagListener listener) Sets the callback for conversation tag changes. This listener is triggered when a user adds, removes, or updates tags on another device, enabling synchronization across multiple devices. Upon receiving this callback, you can call getTags to retrieve the latest tag information. Call this method after initialization but before connecting. - Parameters:
- listener- The conversation tag listener.
- Since:
- 5.1.1 
 
 - 
                                        setUploadCallback@Deprecated() abstract void setUploadCallback(UploadCallback pCallback) Sets the callback for uploading RLog logs to the server. - Parameters:
- pCallback- The log upload callback.
- Since:
- 5.0.0 
 
 - 
                                        stopDestructMessageabstract void stopDestructMessage(Message message) Cancel the burn-after-reading message. Only supported in one-to-one chat. - Parameters:
- message- The message to cancel burn-after-reading.
- Since:
- 5.0.0 
 
 - 
                                        supportResumeBrokenTransferabstract void supportResumeBrokenTransfer(String url, IRongCoreCallback.ResultCallback<Boolean> callback) Determines whether resumable upload is supported. - Parameters:
- url- The file URL
- callback- The callback
- Since:
- 5.0.0 
 
 - 
                                        switchAppKeyabstract void switchAppKey(String appKey) Switch appKey. When an application corresponds to multiple environments, i.e., multiple appKeys, call this method to achieve hot-switching of the RCSDK. Note: After calling this method, you must call init and connect again, passing the token corresponding to the new appKey, to reinitialize and reconnect. - Parameters:
- appKey- The alternate appKey for the application.
- Since:
- 5.0.0 
 
 - 
                                        syncConversationReadStatusabstract void syncConversationReadStatus(ConversationType type, String targetId, long timestamp, IRongCoreCallback.OperationCallback callback) Synchronizes the read status of a conversation. - Parameters:
- type- The type of the conversation.
- targetId- The ID of the conversation.
- timestamp- The sent timestamp of the last read message in the conversation getSentTime.
- callback- The callback function.
- Since:
- 5.0.0 
 
 - 
                                        updateConversationInfoabstract void updateConversationInfo(ConversationType conversationType, String targetId, String title, String portrait, IRongCoreCallback.ResultCallback<Boolean> callback) Updates conversation information. - Parameters:
- conversationType- The type of the conversation Conversation.
- targetId- The ID of the conversation
- title- The title of the conversation
- portrait- The avatar of the conversation
- callback- The callback
- Since:
- 5.0.0 
 
 - 
                                        updateMessageExpansionabstract void updateMessageExpansion(Map<String, String> expansion, String messageUId, IRongCoreCallback.OperationCallback callback) Update message extension information Each message can carry a maximum of 300 key-value pairs of extension information. A single update can set a maximum of 20 key-value pairs. - Parameters:
- expansion- The key-value pairs of message extension information to be updated, of type HashMap.
- messageUId- The messageUId of the message
- callback- Callback for updating extension information
- Since:
- 5.0.0 
 
 - 
                                        addToBlacklistabstract void addToBlacklist(String userId, IRongCoreCallback.OperationCallback callback) Adds a user to the blocklist. After adding a user to the blocklist, when they send a message, they will receive a notification saying, Your message has been sent, but it was rejected by the recipient. However, you can still send messages to them. - Parameters:
- userId- The user ID.
- callback- Callback for adding to the blocklist.
- Since:
- 5.0.0 
 
 - 
                                        doMethodabstract Map doMethod(String clazzName, String methodKey, Map param) - Since:
- 5.0.0 
 
 - 
                                        updateTagabstract void updateTag(TagInfo tagInfo, IRongCoreCallback.OperationCallback callback) Update Tag - Parameters:
- tagInfo- TagInfo
- callback- Callback
- Since:
- 5.1.1 
 
 - 
                                        getUnreadCountByTagabstract void getUnreadCountByTag(String tagId, boolean containBlocked, IRongCoreCallback.ResultCallback<Integer> callback) Get unread message count by tag - Parameters:
- tagId- tag id
- containBlocked- Indicates whether to include messages from muted conversations
- callback- Callback for retrieving unread message count by tag
- Since:
- 5.1.1 
 
 - 
                                        getRCConfigurationabstract RCConfiguration getRCConfiguration() IM Configuration - Since:
- 5.2.0 
 
 - 
                                        updateRcConfigurationabstract void updateRcConfiguration(RCConfiguration configuration) Update RCConfiguration Must be set after the init method is executed to take effect - Since:
- 5.2.0 
 
 - 
                                        isTextTranslationSupportedabstract boolean isTextTranslationSupported() Indicates whether the translation feature is supported. - Since:
- 5.2.1 
 
 - 
                                        getTranslationInfoabstract TranslationInfo getTranslationInfo(int messageId, String language) Retrieves cached translation information - Parameters:
- messageId- The ID of the message
- language- The language identifier
- Returns:
- The cached translation information 
- Since:
- 5.2.1 
 
 - 
                                        saveMessageTranslationabstract void saveMessageTranslation(int messageId, String content, String targetLanguage) Save translation - Since:
- 5.2.1 
 
 - 
                                        getAIAddressabstract String getAIAddress() Get the translation URL - Since:
- 5.2.1 
 
 - 
                                        setAppVerabstract void setAppVer(String appVer) Sets the application version information for users integrating the RCSDK. Note: Must be called after init. - Parameters:
- appVer- The user's version information.
- Since:
- 5.0.0 
 
 - 
                                        setPingTimeOutabstract void setPingTimeOut(int time) - Parameters:
- time- Timeout duration in milliseconds
- Since:
- 5.2.5 
 
 - 
                                        enableSingleProcessabstract void enableSingleProcess(boolean enable) Sets whether to enable single process mode. Note: Must be called before init. - Parameters:
- enable- Whether to enable single process mode.
- Since:
- 5.3.0 
 
 - 
                                        setProxyabstract boolean setProxy(RCIMProxy proxy) Set Proxy - Since:
- 5.3.0 
 
 - 
                                        getCurrentProxyabstract RCIMProxy getCurrentProxy() Retrieves the current proxy. - Since:
- 5.3.0 
 
 - 
                                        setCheckDuplicateMessageabstract void setCheckDuplicateMessage(boolean enableCheck) Set the RCmessage deduplication switch When the sender sends a message under poor network conditions, the message reaches the server but the sender does not receive the server's ack, causing the sender to assume the message failed to send. In this case, both the server and the receiver will receive the first message. The sender then resends the message, which reaches the server again, resulting in two messages on the server (with the same content but different messageUids). The receiver will receive two messages with the same content but different messageUids. The SDK will deduplicate the second message with the same content to ensure that only one message is received by both the sender and the receiver for the resent message. When the message volume is low, message deduplication has little impact. However, when there is a large number of local messages, deduplication can cause performance issues. If the app has a large number of local messages and experiences message reception lag, it is recommended to turn off deduplication. - Parameters:
- enableCheck- Whether to use the RCmessage deduplication mechanism.
- Since:
- 5.3.4 
 
 - 
                                        getMinioOSSAddrabstract String getMinioOSSAddr() 
 - 
                                        sendReadReceiptMessageV4abstract void sendReadReceiptMessageV4(ConversationType conversationType, String targetId, String startMessageUID, String endMessageUID, IRongCoreCallback.OperationCallback callback) Send read receipt v4 (supports one-to-one and group chat) - Parameters:
- conversationType- Conversation type
- targetId- Conversation ID
- startMessageUID- Message UID from which the read receipt starts in group chat (empty for one-to-one chat)
- endMessageUID- Message UID of the last read message
- callback- Callback function
- Since:
- 5.6.7 
 
 - 
                                        getMessageReadReceiptV4abstract void getMessageReadReceiptV4(String targetId, String messageUID, IRongCoreCallback.ResultCallbackEx<Integer, Integer, List<GroupMessageReader>> callback) Get the list of users who have read the message (supports group chats) - Parameters:
- targetId- The conversation ID
- messageUID- The message in the conversation that requires a read receipt
- callback- The callback function
- Since:
- 5.6.7 
 
 - 
                                        subscribeEventabstract void subscribeEvent(SubscribeEventRequest request, IRongCoreCallback.SubscribeEventCallback<List<String>> callback) Subscribes to user status events. This method is used to subscribe to the status of a group of users. When the status of these users changes, the caller will be notified through the callback interface. - Parameters:
- request- The subscription request object containing the user information for which status needs to be subscribed.
- callback- The result callback used to receive the result of the subscription operation or status update notifications.
- Since:
- 5.8.0 
 
 - 
                                        unSubscribeEventabstract void unSubscribeEvent(SubscribeEventRequest request, IRongCoreCallback.SubscribeEventCallback<List<String>> callback) Unsubscribes from user status events. This method is used to unsubscribe from previously subscribed user status events. - Parameters:
- request- The unsubscribe request object containing user information for unsubscribing from status events.
- callback- The result callback for receiving the outcome of the unsubscribe operation.
- Since:
- 5.8.0 
 
 - 
                                        addSubscribeEventListenerabstract void addSubscribeEventListener(OnSubscribeEventListener listener) Adds a subscription event listener. Used to add a listener to receive all subscribed user status change events. - Parameters:
- listener- The subscription event listener.
- Since:
- 5.8.0 
 
 - 
                                        querySubscribeEventabstract void querySubscribeEvent(SubscribeEventRequest request, IRongCoreCallback.ResultCallback<List<SubscribeInfoEvent>> callback) Queries the current status of subscribed events. This method retrieves the status information of all currently subscribed events. - Parameters:
- request- The query request object, which can specify the particular subscribed events to query.
- callback- The callback through which the list of subscribed events is returned upon completion of the query operation.
- Since:
- 5.8.0 
 
 - 
                                        querySubscribeEventabstract void querySubscribeEvent(SubscribeEventRequest request, int pageSize, int startIndex, IRongCoreCallback.ResultCallback<List<SubscribeInfoEvent>> callback) 
 - 
                                        updateMyUserProfileabstract void updateMyUserProfile(UserProfile profile, IRongCoreCallback.UpdateUserProfileCallback callback) Update user profile Note: It is recommended to fetch the user profile first and then update the profile based on the latest user profile. - Parameters:
- profile- User profile information
- callback- The operation result is returned through this callback once the operation is completed.
- Since:
- 5.10.0 
 
 - 
                                        getUserProfilesabstract void getUserProfiles(List<String> userIdList, IRongCoreCallback.ResultCallback<List<UserProfile>> callback) Batch retrieve user profiles - Parameters:
- userIdList- List of user IDs, with a maximum of 20 IDs per request
- callback- Returns the list of user profiles through this callback upon completion
- Since:
- 5.10.0 
 
 - 
                                        getMyUserProfileabstract void getMyUserProfile(IRongCoreCallback.ResultCallback<UserProfile> callback) Get the current user profile - Parameters:
- callback- The user profile is returned through this callback after the operation is completed.
- Since:
- 5.10.0 
 
 - 
                                        updateMyUserProfileVisibilityabstract void updateMyUserProfileVisibility(UserProfileVisibility visibility, IRongCoreCallback.ResultCallback<Boolean> callback) User Permission Settings - Parameters:
- visibility- User information permission
- callback- The operation result is returned through this callback after the operation is completed.
- Since:
- 5.10.0 
 
 - 
                                        getMyUserProfileVisibilityabstract void getMyUserProfileVisibility(IRongCoreCallback.ResultCallback<UserProfileVisibility> callback) User Permission Retrieval - Parameters:
- callback- The operation result is returned through this callback after the operation is completed.
- Since:
- 5.10.0 
 
 - 
                                        setDatabaseOperationTimeThresholdabstract void setDatabaseOperationTimeThreshold(int milliseconds) 
 - 
                                        searchUserProfileByUniqueIdabstract void searchUserProfileByUniqueId(String uniqueId, IRongCoreCallback.ResultCallback<UserProfile> callback) Search for user information by exact user application ID - Parameters:
- uniqueId- The user application ID
- callback- The callback to return the result after the operation is completed
- Since:
- 5.10.0 
 
 - 
                                        createGroupabstract void createGroup(GroupInfo groupInfo, List<String> inviteeUserIds, IRongCoreCallback.CreateGroupCallback callback) Create Group Note: The following attributes can be set in the group information (GroupInfo): 1. Group ID (id), with a maximum length of 64 characters. Supports a combination of uppercase and lowercase letters and numbers. 2. Group name (name), with a maximum length of 64 characters. 3. Group avatar (portraitUri), with a maximum length of 128 characters. 4. Group introduction (introduction), with a maximum length of 512 characters. 5. Group notice (notice), with a maximum length of 1024 characters. 6. Group extended information (extProfile), with a default maximum of 10 items. This must be configured via the developer console or API; otherwise, the setting will fail. 7. Active join group permission mode (joinPermission). 8. Remove member from group permission mode (removeMemberPermission). 9. Invite others to join group permission mode (invitePermission). 10. Invited user join group permission mode (inviteHandlePermission). 11. Group information update permission mode (groupInfoEditPermission). 12. Group member information update permission mode (memberInfoEditPermission). Note: Group ID (id) and group name (name) are mandatory fields; otherwise, the API call will fail. For details, refer to GroupInfo. - Parameters:
- groupInfo- Group information.
- inviteeUserIds- An array of user IDs to be invited to the group, with a maximum of 30 users allowed at once.
- callback- The result of the operation is returned via this callback.
 
 - 
                                        updateGroupInfoabstract void updateGroupInfo(GroupInfo groupInfo, IRongCoreCallback.OperationCallbackEx<String> callback) Update group information The group information update mode, defined by , determines whether group information and permission details can be modified. Note: The following attributes of the group information (GroupInfo) can be set: 1. Group ID (id), with a maximum length of 64 characters. Supports a combination of uppercase and lowercase letters and numbers. 2. Group name (name), with a maximum length of 64 characters. 3. Group avatar (portraitUri), with a maximum length of 128 characters. 4. Group introduction (introduction), with a maximum length of 512 characters. 5. Group notice (notice), with a maximum length of 1024 characters. 6. Group extended information (extProfile), which can be set up to 10 items by default. This must be configured via the developer backend or API; otherwise, the setting will fail. 7. Permission mode for actively joining the group (joinPermission). 8. Permission mode for removing members from the group (removeMemberPermission). 9. Permission mode for inviting others to join the group (invitePermission). 10. Permission mode for handling invitations to join the group (inviteHandlePermission). 11. Permission mode for updating group information (groupInfoEditPermission). 12. Permission mode for updating member information (memberInfoEditPermission). Note: The group ID (id) and group name (name) are mandatory fields; otherwise, the API call will fail. For more details, refer to GroupInfo. - Parameters:
- groupInfo- The group information to be updated.
- callback- The callback to return the result after the operation is completed.
 
 - 
                                        getGroupsInfoabstract void getGroupsInfo(List<String> groupIds, IRongCoreCallback.ResultCallback<List<GroupInfo>> callback) Batch Retrieve Group Information Note: Only returns information for existing groups. - Parameters:
- groupIds- Array of group IDs.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        kickGroupMembersabstract void kickGroupMembers(String groupId, List<String> userIds, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback) Remove from Group Note: After a user is removed, the group conversation information is retained, but the user will no longer receive messages from this group. Local historical messages are not deleted. - Parameters:
- groupId- The group ID.
- userIds- An array of group member IDs.
- config- Configuration for removing users from the group.
- callback- The result of the operation is returned through this callback.
 
 - 
                                        quitGroupabstract void quitGroup(String groupId, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback) Exit a group Note: After exiting, the group conversation information is retained, but the user will no longer receive messages from this group. Local historical messages are not deleted. - Parameters:
- groupId- The group ID.
- config- Configuration for exiting the group.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        dismissGroupabstract void dismissGroup(String groupId, IRongCoreCallback.OperationCallback callback) Dismiss a group Note: Only the group owner can dismiss a group they created. After dismissal, the group conversation information is retained, and local history messages are not deleted. - Parameters:
- groupId- The ID of the group.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        transferGroupOwnerabstract void transferGroupOwner(String groupId, String newOwnerId, boolean quitGroup, QuitGroupConfig config, IRongCoreCallback.OperationCallback callback) Transfer group ownership - Parameters:
- groupId- The group ID.
- newOwnerId- The user ID of the new group owner after the transfer.
- quitGroup- Whether to quit the group after the transfer.
- config- Configuration for kicking out of the group.
- callback- The result of the operation is returned through this callback.
 
 - 
                                        addGroupManagersabstract void addGroupManagers(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback) Add Group Administrators Note: Only the group owner can add group administrators. A group can have up to 10 administrators. The group owner cannot be set as an administrator. - Parameters:
- groupId- The group ID.
- userIds- The list of administrator user IDs.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        removeGroupManagersabstract void removeGroupManagers(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback) Remove group administrators - Parameters:
- groupId- The group ID.
- userIds- List of administrator user IDs.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        getGroupMembersByRoleabstract void getGroupMembersByRole(String groupId, GroupMemberRole role, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupMemberInfo> callback) Retrieve the member list of a specified group with pagination. Note: The results are prioritized in the following order: group owner, group administrators, and then regular group members. - Parameters:
- groupId- The group ID.
- role- The role of the group members to query.
- option- Pagination request parameters.
- callback- The callback through which the result is returned upon completion.
 
 - 
                                        getGroupMembersabstract void getGroupMembers(String groupId, List<String> userIds, IRongCoreCallback.ResultCallback<List<GroupMemberInfo>> callback) Retrieves information about specified group members - Parameters:
- groupId- The ID of the group.
- userIds- A list of group member IDs.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        setGroupMemberInfoabstract void setGroupMemberInfo(String groupId, String userId, String nickname, String extra, IRongCoreCallback.OperationCallback callback) Set group member profile The group member information update mode, memberInfoEditPermission , determines whether group member profiles can be modified. - Parameters:
- groupId- The group ID.
- userId- The user ID of the group member.
- nickname- The nickname of the group member.
- extra- Additional information for the group member.
- callback- The callback through which the result is returned after the operation is completed.
 
 - 
                                        searchGroupMembersabstract void searchGroupMembers(String groupId, String name, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupMemberInfo> callback) Query group member information based on group member nickname. - Parameters:
- groupId- The ID of the group.
- name- The search keyword for the group member nickname.
- option- Pagination request parameters.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        joinGroupabstract void joinGroup(String groupId, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback) Join a group The group join permission io.rong.imlib.model.GroupJoinPermission determines whether a user can join the group. - Parameters:
- groupId- The ID of the group.
- callback- The callback that returns the result after the operation is completed.
 
 - 
                                        inviteUsersToGroupabstract void inviteUsersToGroup(String groupId, List<String> userIds, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback) Invite Users to Join a Group Who can invite others to join the group is determined by . How the invitation to join the group is handled is determined by . - Parameters:
- groupId- The ID of the group.
- userIds- The list of user IDs to be invited.
- callback- The callback to return the result after the operation is completed.
 
 - 
                                        acceptGroupInviteabstract void acceptGroupInvite(String groupId, String inviterId, IRongCoreCallback.OperationCallback callback) User agrees to join a group - Parameters:
- groupId- The ID of the group.
- inviterId- The user ID of the inviter.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        refuseGroupInviteabstract void refuseGroupInvite(String groupId, String inviterId, String reason, IRongCoreCallback.OperationCallback callback) User declined to join the group - Parameters:
- groupId- The ID of the group.
- inviterId- The user ID of the inviter.
- reason- The reason for declining: Optional field, users can choose to input a reason when declining, with a maximum of 128 characters.
- callback- The result of the operation is returned through this callback.
 
 - 
                                        acceptGroupApplicationabstract void acceptGroupApplication(String groupId, String inviterId, String applicantId, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback) The group owner or administrator approves the user to join the group. - Parameters:
- groupId- The ID of the group.
- inviterId- The ID of the inviter.
- applicantId- The ID of the user requesting to join the group.
- callback- The callback through which the operation result is returned.
 
 - 
                                        refuseGroupApplicationabstract void refuseGroupApplication(String groupId, String inviterId, String applicantId, String reason, IRongCoreCallback.OperationCallback callback) The group owner or administrator rejects a user's request to join the group. - Parameters:
- groupId- The ID of the group.
- inviterId- The ID of the inviter.
- applicantId- The ID of the user applying to join the group.
- reason- The reason for rejection.
- callback- The callback to return the result after the operation is completed.
 
 - 
                                        getGroupApplicationsabstract void getGroupApplications(PagingQueryOption option, Array<GroupApplicationDirection> directions, Array<GroupApplicationStatus> status, IRongCoreCallback.PageResultCallback<GroupApplicationInfo> callback) Fetch paginated group request list - Parameters:
- option- Pagination request parameters.
- directions- Array of request directions.
- status- Array of group request statuses.
- callback- Callback that returns the result after the operation is completed.
 
 - 
                                        getJoinedGroupsByRoleabstract void getJoinedGroupsByRole(GroupMemberRole role, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupInfo> callback) Paginated query for the list of groups a user belongs to - Parameters:
- role- The user's role in the group.
- option- Pagination request parameters.
- callback- The result is returned through this callback upon completion.
 
 - 
                                        searchJoinedGroupsabstract void searchJoinedGroups(String groupName, PagingQueryOption option, IRongCoreCallback.PageResultCallback<GroupInfo> callback) Search for groups I have joined by group name - Parameters:
- groupName- The search keyword for group name.
- option- Pagination request parameters.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        getJoinedGroupsabstract void getJoinedGroups(List<String> groupIds, IRongCoreCallback.ResultCallback<List<GroupInfo>> callback) Batch retrieve the groups I have joined - Parameters:
- groupIds- List of group IDs.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        setGroupRemarkabstract void setGroupRemark(String groupId, String remark, IRongCoreCallback.OperationCallback callback) Set Group Alias - Parameters:
- groupId- The group ID.
- remark- The alias.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        addGroupFollowsabstract void addGroupFollows(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback) Set special attention users for a group - Parameters:
- groupId- The group ID.
- userIds- An array of user IDs to be specially followed.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        removeGroupFollowsabstract void removeGroupFollows(String groupId, List<String> userIds, IRongCoreCallback.OperationCallback callback) Remove users from the group's special attention list - Parameters:
- groupId- The group ID.
- userIds- An array of user IDs to be removed from the special attention list.
- callback- The result of the operation is returned through this callback upon completion.
 
 - 
                                        getGroupFollowsabstract void getGroupFollows(String groupId, IRongCoreCallback.ResultCallback<List<FollowInfo>> callback) Query the list of specially followed users in a group - Parameters:
- groupId- The ID of the group.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        setGroupEventListenerabstract void setGroupEventListener(GroupEventListener listener) 
 - 
                                        addFriendabstract void addFriend(String userId, DirectionType directionType, String extra, IRongCoreCallback.ResultCallback<IRongCoreEnum.CoreErrorCode> callback) Add Friend - Parameters:
- userId- The user ID of the user to be added as a friend.
- directionType- The direction type of the friend relationship: bidirectional friend.
- extra- Additional information.
- callback- The callback that returns the result after the operation is completed.
 
 - 
                                        deleteFriendsabstract void deleteFriends(List<String> userIds, DirectionType directionType, IRongCoreCallback.OperationCallback callback) Remove Friends Note: Mutual friend removal: Removes the friend from both parties' friend lists. - Parameters:
- userIds- List of user IDs to remove from the friend relationship, with a maximum of 100 users per operation.
- directionType- Type of friend removal direction: mutual friends.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        acceptFriendApplicationabstract void acceptFriendApplication(String userId, IRongCoreCallback.OperationCallback callback) Agree to add as a friend - Parameters:
- userId- The user ID of the user who agrees to become a friend
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        refuseFriendApplicationabstract void refuseFriendApplication(String userId, IRongCoreCallback.OperationCallback callback) Reject friend request - Parameters:
- userId- The user ID of the user whose friend request is being rejected
- callback- The result of the operation is returned through this callback.
 
 - 
                                        setFriendInfoabstract void setFriendInfo(String userId, String remark, Map<String, String> extProfile, IRongCoreCallback.OperationCallback callback) Set friend information - Parameters:
- userId- The user ID of the friend
- remark- The remark name for the friend.
- extProfile- Extended information.
- callback- The result is returned via this callback after the operation is completed.
 
 - 
                                        checkFriendsabstract void checkFriends(List<String> userIds, DirectionType directionType, IRongCoreCallback.ResultCallback<List<FriendRelationInfo>> callback) Check friend relationship For details on friend relationship types, refer to - Parameters:
- userIds- List of user IDs to check for friend relationships.
- directionType- The type of friend direction to check: bidirectional friend.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        getFriendsabstract void getFriends(QueryFriendsDirectionType type, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback) Get the complete friend list - Parameters:
- type- The direction type of friends: bidirectional friends.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        getFriendApplicationsabstract void getFriendApplications(PagingQueryOption option, Array<FriendApplicationType> types, Array<FriendApplicationStatus> status, IRongCoreCallback.PageResultCallback<FriendApplicationInfo> callback) Paginate through the list of friend requests - Parameters:
- option- Pagination request parameters.
- types- Request types.
- status- Request status.
- callback- The result is returned through this callback upon completion.
 
 - 
                                        getFriendsInfoabstract void getFriendsInfo(List<String> userIds, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback) Search for friend information based on user IDs - Parameters:
- userIds- List of user IDs, with a maximum of 100 friend information retrievable at once
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        searchFriendsInfoabstract void searchFriendsInfo(String name, IRongCoreCallback.ResultCallback<List<FriendInfo>> callback) Search for friend information based on nickname - Parameters:
- name- The nickname keyword of the user.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        setFriendAddPermissionabstract void setFriendAddPermission(FriendAddPermission permission, IRongCoreCallback.OperationCallback callback) Sets the friend request permission for the current user. - Parameters:
- permission- The friend request permission.
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        getFriendAddPermissionabstract void getFriendAddPermission(IRongCoreCallback.ResultCallback<FriendAddPermission> callback) Get the current user's friend request permission - Parameters:
- callback- The result is returned through this callback after the operation is completed.
 
 - 
                                        setFriendEventListenerabstract void setFriendEventListener(FriendEventListener listener) 
 - 
                                        removeDatabaseabstract IRongCoreEnum.CoreErrorCode removeDatabase(String userId) Deletes the message database for the specified user. - Parameters:
- userId- The user ID
- Returns:
- IRongCoreEnum.CoreErrorCode The result of the deletion 
 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-