Added in API level 19

Conversations


class Conversations : BaseColumns, Telephony.TextBasedSmsColumns

Contains a view of SMS conversations (also referred to as threads). This is similar to Threads, but only includes SMS messages and columns relevant to SMS conversations.

Note that this view ignores any information about MMS messages, it is a view of conversations as if MMS messages did not exist at all. This means that all relevant information, such as snippets and message count, will ignore any MMS messages that might be in the same thread through other views and present only data based on the SMS messages in that thread.

Summary

Constants
static String

The default sort order for this table.

static String

The number of messages in the conversation.

static String

The first 45 characters of the body of the most recent message.

Inherited constants
String ADDRESS

The address of the other party.

Type: TEXT

String BODY

The body of the message.

Type: TEXT

String CREATOR

The identity of the sender of a sent message. It is usually the package name of the app which sends the message.

Note: This column is read-only. It is set by the provider and can not be changed by apps.

Type: TEXT

String DATE

The date the message was received.

Type: INTEGER (long)

String DATE_SENT

The date the message was sent.

Type: INTEGER (long)

String ERROR_CODE

Error code associated with sending or receiving this message

Type: INTEGER

String LOCKED

Is the message locked?

Type: INTEGER (boolean)

Int MESSAGE_TYPE_ALL

Message type: all messages.

Int MESSAGE_TYPE_DRAFT

Message type: drafts.

Int MESSAGE_TYPE_FAILED

Message type: failed outgoing message.

Int MESSAGE_TYPE_INBOX

Message type: inbox.

Int MESSAGE_TYPE_OUTBOX

Message type: outbox.

Int MESSAGE_TYPE_QUEUED

Message type: queued to send later.

Int MESSAGE_TYPE_SENT

Message type: sent messages.

String PERSON

The ID of the sender of the conversation, if present.

Type: INTEGER (reference to item in content://contacts/people)

String PROTOCOL

The protocol identifier code.

Type: INTEGER

String READ

Has the message been read?

Type: INTEGER (boolean)

String REPLY_PATH_PRESENT

Is the TP-Reply-Path flag set?

Type: BOOLEAN

String SEEN

Has the message been seen by the user? The "seen" flag determines whether we need to show a notification.

Type: INTEGER (boolean)

String SERVICE_CENTER

The service center (SC) through which to send the message, if present.

Type: TEXT

String STATUS

TP-Status value for the message, or -1 if no status has been received.

Type: INTEGER

Int STATUS_COMPLETE

TP-Status: complete.

Int STATUS_FAILED

TP-Status: failed.

Int STATUS_NONE

TP-Status: no status received.

Int STATUS_PENDING

TP-Status: pending.

String SUBJECT

The subject of the message, if present.

Type: TEXT

String SUBSCRIPTION_ID

The subscription to which the message belongs to. Its value will be < 0 if the sub id cannot be determined.

Type: INTEGER (long)

String THREAD_ID

The thread ID of the message.

Type: INTEGER

String TYPE

The type of message.

Type: INTEGER

String _COUNT

The count of rows in a directory.

Type: INTEGER

String _ID

The unique ID for a row.

Type: INTEGER (long)

Properties
static Uri!

The content:// style URL for this table.

Constants

DEFAULT_SORT_ORDER

Added in API level 19
static val DEFAULT_SORT_ORDER: String

The default sort order for this table.

Value: "date DESC"

MESSAGE_COUNT

Added in API level 19
static val MESSAGE_COUNT: String

The number of messages in the conversation.

Type: INTEGER

Value: "msg_count"

SNIPPET

Added in API level 19
static val SNIPPET: String

The first 45 characters of the body of the most recent message.

Type: TEXT

Value: "snippet"

Properties

CONTENT_URI

Added in API level 19
static val CONTENT_URI: Uri!

The content:// style URL for this table.