Search Chat Conversation

To find a message or similar messages that matches a search term within a chat conversation between two or in a group or among all conversations call the method below.

FlyCore.searchConversation(SEARCH_TERM, JID,GLOBAL_SEARCH,
((isSuccess, throwable, data) -> {
if (isSuccess) {
ArrayList<ChatMessage> result = (ArrayList<ChatMessage>) data.get("data")
} else {
//Getting search result failed print throwable to find the exception details.
SEARCH_TERMStringtext characters for which search has to happen
JIDStringUnique identifier of a contact/Group (can be empty for global search)
GLOBAL_SEARCHbooleanif true then search won't be restricted by jid and search operation executes on every conversation
CALLBACKFlyCallbackFlyCallback implemented as lambda expression

Search term can't be empty, for global search pass a empty String as argument for JID.