Loading telephony/java/android/telephony/TelephonyManager.java +32 −11 Original line number Diff line number Diff line Loading @@ -127,19 +127,40 @@ public class TelephonyManager { /** * The Phone app sends this intent when a user opts to respond-via-message during an incoming * call. By default, the MMS app consumes this message and sends a text message to the caller. A * third party app can provide this functionality in lieu of MMS app by consuming this Intent * and sending the message using their own messaging system. The intent contains a URI * describing the recipient, and an EXTRA containing the message itself. * call. By default, the device's default SMS app consumes this message and sends a text message * to the caller. A third party app can also provide this functionality by consuming this Intent * with a {@link android.app.Service} and sending the message using its own messaging system. * <p>The intent contains a URI (available from {@link android.content.Intent#getData}) * describing the recipient, using either the {@code sms:}, {@code smsto:}, {@code mms:}, * or {@code mmsto:} URI schema. Each of these URI schema carry the recipient information the * same way: the path part of the URI contains the recipient's phone number or a comma-separated * set of phone numbers if there are multiple recipients. For example, {@code * smsto:2065551234}.</p> * * <p>The intent may also contain extras for the message text (in {@link * android.content.Intent#EXTRA_TEXT}) and a message subject * (in {@link android.content.Intent#EXTRA_SUBJECT}).</p> * * <p class="note"><strong>Note:</strong> * The intent-filter which consumes this Intent needs to be in a service which requires the * The intent-filter that consumes this Intent needs to be in a {@link android.app.Service} * that requires the * permission {@link android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE}.</p> * * <p> * {@link android.content.Intent#getData} is a URI describing the recipient of the message. * <p> * The {@link android.content.Intent#EXTRA_TEXT} extra contains the message * to send. * <p>For example, the service that receives this intent can be declared in the manifest file * with an intent filter like this:</p> * <pre> * <!-- Service that delivers SMS messages received from the phone "quick response" --> * <service android:name=".HeadlessSmsSendService" * android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" * android:exported="true" > * <intent-filter> * <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" /> * <category android:name="android.intent.category.DEFAULT" /> * <data android:scheme="sms" /> * <data android:scheme="smsto" /> * <data android:scheme="mms" /> * <data android:scheme="mmsto" /> * </intent-filter> * </service></pre> * <p> * Output: nothing. */ Loading Loading
telephony/java/android/telephony/TelephonyManager.java +32 −11 Original line number Diff line number Diff line Loading @@ -127,19 +127,40 @@ public class TelephonyManager { /** * The Phone app sends this intent when a user opts to respond-via-message during an incoming * call. By default, the MMS app consumes this message and sends a text message to the caller. A * third party app can provide this functionality in lieu of MMS app by consuming this Intent * and sending the message using their own messaging system. The intent contains a URI * describing the recipient, and an EXTRA containing the message itself. * call. By default, the device's default SMS app consumes this message and sends a text message * to the caller. A third party app can also provide this functionality by consuming this Intent * with a {@link android.app.Service} and sending the message using its own messaging system. * <p>The intent contains a URI (available from {@link android.content.Intent#getData}) * describing the recipient, using either the {@code sms:}, {@code smsto:}, {@code mms:}, * or {@code mmsto:} URI schema. Each of these URI schema carry the recipient information the * same way: the path part of the URI contains the recipient's phone number or a comma-separated * set of phone numbers if there are multiple recipients. For example, {@code * smsto:2065551234}.</p> * * <p>The intent may also contain extras for the message text (in {@link * android.content.Intent#EXTRA_TEXT}) and a message subject * (in {@link android.content.Intent#EXTRA_SUBJECT}).</p> * * <p class="note"><strong>Note:</strong> * The intent-filter which consumes this Intent needs to be in a service which requires the * The intent-filter that consumes this Intent needs to be in a {@link android.app.Service} * that requires the * permission {@link android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE}.</p> * * <p> * {@link android.content.Intent#getData} is a URI describing the recipient of the message. * <p> * The {@link android.content.Intent#EXTRA_TEXT} extra contains the message * to send. * <p>For example, the service that receives this intent can be declared in the manifest file * with an intent filter like this:</p> * <pre> * <!-- Service that delivers SMS messages received from the phone "quick response" --> * <service android:name=".HeadlessSmsSendService" * android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" * android:exported="true" > * <intent-filter> * <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" /> * <category android:name="android.intent.category.DEFAULT" /> * <data android:scheme="sms" /> * <data android:scheme="smsto" /> * <data android:scheme="mms" /> * <data android:scheme="mmsto" /> * </intent-filter> * </service></pre> * <p> * Output: nothing. */ Loading