# Telephony

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/provider/Telephony#nestedclasses)\|[Inherited Methods](https://developer.android.com/reference/android/provider/Telephony#inhmethods)  

# Telephony

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/provider/Telephony "View this page in Kotlin")\|Java

`
public

final

class
Telephony
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.Telephony |

<br />

*** ** * ** ***

The Telephony provider contains data related to phone operation, specifically SMS and MMS messages, access to the APN list, including the MMSC to use, and the service state.

**Note:** These APIs are not available on all Android-powered devices. If your app depends on telephony features such as for managing SMS messages, include a[`<uses-feature>`](https://developer.android.com/guide/topics/manifest/uses-feature-element)element in your manifest that declares the`"android.hardware.telephony"`hardware feature. Alternatively, you can check for telephony availability at runtime using either[hasSystemFeature(PackageManager.FEATURE_TELEPHONY)](https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)).

### Creating an SMS app

Only the default SMS app (selected by the user in system settings) is able to write to the SMS Provider (the tables defined within the`Telephony`class) and only the default SMS app receives the[Telephony.Sms.Intents.SMS_DELIVER_ACTION](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_DELIVER_ACTION)broadcast when the user receives an SMS or the[Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#WAP_PUSH_DELIVER_ACTION)broadcast when the user receives an MMS.

Any app that wants to behave as the user's default SMS app must handle the following intents:

- In a broadcast receiver, include an intent filter for[Telephony.Sms.Intents.SMS_DELIVER_ACTION](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_DELIVER_ACTION)(`"android.provider.Telephony.SMS_DELIVER"`). The broadcast receiver must also require the[Manifest.permission.BROADCAST_SMS](https://developer.android.com/reference/android/Manifest.permission#BROADCAST_SMS)permission.

  This allows your app to directly receive incoming SMS messages.
- In a broadcast receiver, include an intent filter for[Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#WAP_PUSH_DELIVER_ACTION)} (`"android.provider.Telephony.WAP_PUSH_DELIVER"`) with the MIME type`"application/vnd.wap.mms-message"`. The broadcast receiver must also require the[Manifest.permission.BROADCAST_WAP_PUSH](https://developer.android.com/reference/android/Manifest.permission#BROADCAST_WAP_PUSH)permission.

  This allows your app to directly receive incoming MMS messages.
- In your activity that delivers new messages, include an intent filter for[Intent.ACTION_SENDTO](https://developer.android.com/reference/android/content/Intent#ACTION_SENDTO)(`"android.intent.action.SENDTO"
  `) with schemas,`sms:`,`smsto:`,`mms:`, and`mmsto:`.

  This allows your app to receive intents from other apps that want to deliver a message.
- In a service, include an intent filter for[TelephonyManager.ACTION_RESPOND_VIA_MESSAGE](https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_RESPOND_VIA_MESSAGE)(`"android.intent.action.RESPOND_VIA_MESSAGE"`) with schemas,`sms:`,`smsto:`,`mms:`, and`mmsto:`. This service must also require the[Manifest.permission.SEND_RESPOND_VIA_MESSAGE](https://developer.android.com/reference/android/Manifest.permission#SEND_RESPOND_VIA_MESSAGE)permission.

  This allows users to respond to incoming phone calls with an immediate text message using your app.

Other apps that are not selected as the default SMS app can only*read* the SMS Provider, but may also be notified when a new SMS arrives by listening for the[Telephony.Sms.Intents.SMS_RECEIVED_ACTION](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION)broadcast, which is a non-abortable broadcast that may be delivered to multiple apps. This broadcast is intended for apps that---while not selected as the default SMS app---need to read special incoming messages such as to perform phone number verification.

For more information about building SMS apps, read the blog post,[Getting Your SMS Apps Ready for KitKat](http://android-developers.blogspot.com/2013/10/getting-your-sms-apps-ready-for-kitkat.html).

<br />

## Summary

|                                                                                                                                                                  ### Nested classes                                                                                                                                                                   ||
|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [Telephony.BaseMmsColumns](https://developer.android.com/reference/android/provider/Telephony.BaseMmsColumns) Base columns for tables that contain MMSs.                                                                                                                                                                                |
| ` interface` | [Telephony.CanonicalAddressesColumns](https://developer.android.com/reference/android/provider/Telephony.CanonicalAddressesColumns) Columns for the "canonical_addresses" table used by MMS and SMS.                                                                                                                                    |
| ` class`     | [Telephony.CarrierId](https://developer.android.com/reference/android/provider/Telephony.CarrierId) Contains carrier identification information for the current subscriptions.                                                                                                                                                          |
| ` class`     | [Telephony.Carriers](https://developer.android.com/reference/android/provider/Telephony.Carriers) Carriers class contains information about APNs, including MMSC information.                                                                                                                                                           |
| ` class`     | [Telephony.Mms](https://developer.android.com/reference/android/provider/Telephony.Mms) Contains all MMS messages.                                                                                                                                                                                                                      |
| ` class`     | [Telephony.MmsSms](https://developer.android.com/reference/android/provider/Telephony.MmsSms) Contains all MMS and SMS messages.                                                                                                                                                                                                        |
| ` class`     | [Telephony.ServiceStateTable](https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable) Constants for interfacing with the ServiceStateProvider and the different fields of the[ServiceState](https://developer.android.com/reference/android/telephony/ServiceState)class accessible through the provider. |
| ` class`     | [Telephony.Sms](https://developer.android.com/reference/android/provider/Telephony.Sms) Contains all text-based SMS messages.                                                                                                                                                                                                           |
| ` interface` | [Telephony.TextBasedSmsColumns](https://developer.android.com/reference/android/provider/Telephony.TextBasedSmsColumns) Base columns for tables that contain text-based SMSs.                                                                                                                                                           |
| ` class`     | [Telephony.Threads](https://developer.android.com/reference/android/provider/Telephony.Threads) Helper functions for the "threads" table used by MMS and SMS.                                                                                                                                                                           |
| ` interface` | [Telephony.ThreadsColumns](https://developer.android.com/reference/android/provider/Telephony.ThreadsColumns) Columns for the "threads" table used by MMS and SMS.                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||