Telephony.Sms
public static final class Telephony.Sms
extends Object
implements BaseColumns, Telephony.TextBasedSmsColumns
java.lang.Object | |
↳ | android.provider.Telephony.Sms |
Contains all text-based SMS messages.
Summary
Nested classes | |
---|---|
class | Telephony.Sms.Conversations Contains a view of SMS conversations (also referred to as threads). |
class | Telephony.Sms.Draft Contains all draft text-based SMS messages in the SMS app. |
class | Telephony.Sms.Inbox Contains all text-based SMS messages in the SMS app inbox. |
class | Telephony.Sms.Intents Contains constants for SMS related Intents that are broadcast. |
class | Telephony.Sms.Outbox Contains all pending outgoing text-based SMS messages. |
class | Telephony.Sms.Sent Contains all sent text-based SMS messages in the SMS app. |
Constants | |
---|---|
String | DEFAULT_SORT_ORDER The default sort order for this table. |
Inherited constants |
---|
Fields | |
---|---|
public static final Uri | CONTENT_URI The |
Public methods | |
---|---|
static String | getDefaultSmsPackage(Context context) Used to determine the currently configured default SMS package. |
Inherited methods | |
---|---|
Constants
DEFAULT_SORT_ORDER
public static final String DEFAULT_SORT_ORDER
The default sort order for this table.
Constant Value: "date DESC"
Fields
CONTENT_URI
public static final Uri CONTENT_URI
The content://
style URL for this table.
Public methods
getDefaultSmsPackage
public static String getDefaultSmsPackage (Context context)
Used to determine the currently configured default SMS package.
As of Android 11 apps will need specific permission to query other packages. To use this method an app must include in their AndroidManifest:
<queries> <intent> <action android:name="android.provider.Telephony.SMS_DELIVER"/> </intent> </queries>
Telephony.Sms.Intents.SMS_DELIVER_ACTION
intent. Parameters | |
---|---|
context | Context : context of the requesting application |
Returns | |
---|---|
String | package name for the default SMS package or null |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.