flow Search Messages
fun flowSearchMessages( context: Context, query: String? = null, contactQuery: String? = null, mediaFilter: MediaFilter = MediaFilter.None, ascOrder: Boolean = false, @IntRange(from = 0 ) limit: Int = 100): Flow<List<MessageSearchResult>?>
Content copied to clipboard
This function retrieves conversations according to the query, contactQuery&mediaFilter based on :
message content or attachment file name
sender number (or his contact name) of the message sent
member in a OneToOne conversation
attachment types matches the mediaFilter
Return
A Flow of MessageSearchResult.
See also
Parameters
context
The application context
query
A search query. Doesn't need any special formatted -- it'll be sanitized.
contact Query
An exact query text related to the recipient name or his number.
media Filter
A filter that will be applied in the search query
asc Order
Whether the result is ordered ascending or descending according to the date
limit
The max number of messages record to be retrieved, 0 will return all possible records. Value should be >= 1. default is 100