Threads
class Threads : Telephony.ThreadsColumns
Helper functions for the "threads" table used by MMS and SMS. Thread IDs are determined by the participants in a conversation and can be used to match both SMS and MMS messages. To avoid issues where applications might cache a thread ID, the thread ID of a deleted thread must not be reused to point at a new thread.
Summary
Inherited constants | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||
|
Public methods | |
---|---|
static Long |
getOrCreateThreadId(context: Context!, recipient: String!) This is a single-recipient version of |
static Long |
getOrCreateThreadId(context: Context!, recipients: MutableSet<String!>!) Given a set of recipients return its thread ID. |
Properties | |
---|---|
static Uri! |
The |
static Uri! |
The |
Constants
BROADCAST_THREAD
static val BROADCAST_THREAD: Int
Thread type: broadcast thread.
Value: 1
COMMON_THREAD
static val COMMON_THREAD: Int
Thread type: common thread.
Value: 0
Public methods
getOrCreateThreadId
static fun getOrCreateThreadId(
context: Context!,
recipient: String!
): Long
This is a single-recipient version of getOrCreateThreadId
. It's convenient for use with SMS messages.
getOrCreateThreadId
static fun getOrCreateThreadId(
context: Context!,
recipients: MutableSet<String!>!
): Long
Given a set of recipients return its thread ID.
If a thread exists containing the provided participants, return its thread ID. Otherwise, this will create a new thread containing the provided participants and return its ID.
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
The content://
style URL for this table, by conversation.
OBSOLETE_THREADS_URI
static val OBSOLETE_THREADS_URI: Uri!
The content://
style URL for this table, for obsolete threads.