TelephonyManager.ActionRespondViaMessage Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Phone app sends this intent when a user opts to respond-via-message during an incoming call.
[Android.Runtime.Register("ACTION_RESPOND_VIA_MESSAGE")]
public const string ActionRespondViaMessage;
[<Android.Runtime.Register("ACTION_RESPOND_VIA_MESSAGE")>]
val mutable ActionRespondViaMessage : string
Field Value
- Attributes
Remarks
The Phone app sends this intent when a user opts to respond-via-message during an incoming 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 android.app.Service
and sending the message using its own messaging system.
The intent contains a URI (available from android.content.Intent#getData
) describing the recipient, using either the sms:
, smsto:
, mms:
, or 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, smsto:2065551234
.
The intent may also contain extras for the message text (in android.content.Intent#EXTRA_TEXT
) and a message subject (in android.content.Intent#EXTRA_SUBJECT
).
<p class="note"><strong>Note:</strong> The intent-filter that consumes this Intent needs to be in a android.app.Service
that requires the permission android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE
.</p>
For example, the service that receives this intent can be declared in the manifest file with an intent filter like this:
<!-- 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>
Output: nothing.
Java documentation for android.telephony.TelephonyManager.ACTION_RESPOND_VIA_MESSAGE
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.