Query Conversations

Requires READ_SMS permission.

Add the following permission in your AndroidManifest.xml

<uses-permission android:name="android.permission.READ_SMS"/>

getConversations()

Returns Future<List<SmsConversation>>

Parameters

Type

Description

Optional

Default Value

Filter

ConversationFilter

Filters the result by given constraints. Works like SQL WHERE clause.

✔️

null

sortOrder

List of OrderBy

Sorts the result prioritized by order of declaration.

✔️

null

List<SmsConversation> conversations = await telephony.getConversations(
filter: SmsFilter.where(ConversationColumn.THREAD_ID)
.equals("12")
.and(ConversationColumn.SNIPPET)
.like("starwars"),
sortOrder: [OrderBy(ConversationColumn.THREAD_ID, sort: Sort.ASC)]
);

All parameters are optional.

List<SmsConversation> conversations = await telephony.getConversations();

SmsConversation

Property

Type

snippet

String

threadId

int

messageCount

int

ConversationColumn

Values

SNIPPET

THREAD_ID

MSG_COUNT

ConversationFilter

Works exactly like SmsFilter but works with ConversationColumn instead of SmsColumn