java.lang.Object | |
↳ | com.android.mms.data.Conversation |
An interface for finding information about conversations and/or creating new ones.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Remove any obsolete conversations sitting around on disk.
| |||||||||||
Create a new conversation with no recipients.
| |||||||||||
Guarantees that the conversation has been created in the database.
| |||||||||||
Returns a temporary Conversation (not representing one on disk) wrapping
the contents of the provided cursor.
| |||||||||||
Find the conversation matching the provided recipient set.
| |||||||||||
Find the conversation matching the provided thread ID.
| |||||||||||
Find the conversation matching in the specified Uri.
| |||||||||||
Returns the time of the last update to this conversation in milliseconds,
on the
currentTimeMillis() timebase. | |||||||||||
Returns the number of messages in this conversation, excluding the draft
(if it exists).
| |||||||||||
Returns the recipient set of this conversation.
| |||||||||||
Returns a snippet of text from the most recent message in the conversation.
| |||||||||||
Returns the thread ID of this conversation.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
Returns a content:// URI referring to this conversation,
or null if it does not exist on disk yet.
| |||||||||||
Returns true if any messages in the conversation have attachments.
| |||||||||||
Returns true if a draft message exists in this conversation.
| |||||||||||
Returns true if any messages in the conversation are in an error state.
| |||||||||||
Returns true if there are any unread messages in the conversation.
| |||||||||||
Set up the conversation cache.
| |||||||||||
Are we in the process of loading and caching all the threads?.
| |||||||||||
Marks all messages in this conversation as read and updates
relevant notifications.
| |||||||||||
Returns true if the recipient in the uri matches the recipient list in this
conversation.
| |||||||||||
Sets whether or not this conversation has a draft message.
| |||||||||||
Sets the list of recipients associated with this conversation.
| |||||||||||
Start a delete of the conversation with the specified thread ID.
| |||||||||||
Start deleting all conversations in the database.
| |||||||||||
Start a query for all conversations in the database on the specified
AsyncQueryHandler.
| |||||||||||
Check for locked messages in all threads or a specified thread.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Remove any obsolete conversations sitting around on disk. Obsolete threads are threads that aren't referenced by any message in the pdu or sms tables.
Create a new conversation with no recipients. setRecipients(ContactList)
can
be called as many times as you like; the conversation will not be
created in the database until ensureThreadId()
is called.
Guarantees that the conversation has been created in the database. This will make a blocking database call if it hasn't.
Returns a temporary Conversation (not representing one on disk) wrapping
the contents of the provided cursor. The cursor should be the one
returned to your AsyncQueryHandler passed in to startQueryForAll(AsyncQueryHandler, int)
.
The recipient list of this conversation can be empty if the results
were not in cache.
Find the conversation matching the provided recipient set.
When called with an empty recipient list, equivalent to createNew(Context)
.
Find the conversation matching the provided thread ID.
Find the conversation matching in the specified Uri. Example
forms: {@value content://mms-sms/conversations/3} or
{@value sms:+12124797990}.
When called with a null Uri, equivalent to createNew(Context)
.
Returns the time of the last update to this conversation in milliseconds,
on the currentTimeMillis()
timebase.
Returns the number of messages in this conversation, excluding the draft (if it exists).
Returns a snippet of text from the most recent message in the conversation.
Returns the thread ID of this conversation. Can be zero if
ensureThreadId()
has not been called yet.
This method is deprecated.
No replacement.
Return the Uri for all messages in the given thread ID.
Returns a content:// URI referring to this conversation, or null if it does not exist on disk yet.
Returns true if any messages in the conversation have attachments.
Returns true if a draft message exists in this conversation.
Returns true if any messages in the conversation are in an error state.
Returns true if there are any unread messages in the conversation.
Set up the conversation cache. To be called once at application startup time.
Are we in the process of loading and caching all the threads?.
Marks all messages in this conversation as read and updates relevant notifications. This method returns immediately; work is dispatched to a background thread.
Returns true if the recipient in the uri matches the recipient list in this conversation.
Sets whether or not this conversation has a draft message.
Sets the list of recipients associated with this conversation.
If called, ensureThreadId()
must be called before the next
operation that depends on this conversation existing in the
database (e.g. storing a draft message to it).
Start a delete of the conversation with the specified thread ID.
handler | An AsyncQueryHandler that will receive onDeleteComplete upon completion of the conversation being deleted |
---|---|
token | The token that will be passed to onDeleteComplete |
deleteAll | Delete the whole thread including locked messages |
threadId | Thread ID of the conversation to be deleted |
Start deleting all conversations in the database.
handler | An AsyncQueryHandler that will receive onDeleteComplete upon completion of all conversations being deleted |
---|---|
token | The token that will be passed to onDeleteComplete |
deleteAll | Delete the whole thread including locked messages |
Start a query for all conversations in the database on the specified AsyncQueryHandler.
handler | An AsyncQueryHandler that will receive onQueryComplete upon completion of the query |
---|---|
token | The token that will be passed to onQueryComplete |
Check for locked messages in all threads or a specified thread.
handler | An AsyncQueryHandler that will receive onQueryComplete upon completion of looking for locked messages |
---|---|
threadId | The threadId of the thread to search. -1 means all threads |
token | The token that will be passed to onQueryComplete |