flowSearchConversations

fun flowSearchConversations(    context: Context,     query: String? = null,     onlyUnread: Boolean = false,     ascOrder: Boolean = false,     @IntRange(from = 0) limit: Int = 100): Flow<List<ConversationSearchResult>?>

This function retrieves conversations following these rules :

1- query :

  • the recipient name or his number in a OneToOne conversations

  • the conversation title in a Group & OneToMany conversations

2- onlyUnread :

  • whether to retrieve only the unread conversations or all of them

Return

A Flow of ConversationSearchResult.

See also

Parameters

context

The application context

query

A search query. Doesn't need any special formatted -- it'll be sanitized.

onlyUnread

If true the result contains only the unread conversations.

ascOrder

Whether the result is ordered ascending or descending according to the date

limit

The max number of conversations record to be retrieved, 0 will return all possible records. Value should be >= 1. default is 100