Share via


SmsManager.SendMultimediaMessage Method

Definition

Overloads

SendMultimediaMessage(Context, Uri, String, Bundle, PendingIntent)

Send an MMS message

        &lt;p class="note"&gt;&lt;strong&gt;Note:&lt;/strong&gt; If <code data-dev-comment-type="c">#getDefault()</code> is used to instantiate this
        manager on a multi-SIM device, this operation may fail sending the MMS message because no
        suitable default subscription could be found.
SendMultimediaMessage(Context, Uri, String, Bundle, PendingIntent, Int64)

Send an MMS message

        Same as <code data-dev-comment-type="c">#sendMultimediaMessage(Context context, Uri contentUri, String locationUrl,
                  Bundle configOverrides, PendingIntent sentIntent)</code>, but adds an optional messageId.

SendMultimediaMessage(Context, Uri, String, Bundle, PendingIntent)

Send an MMS message

        &lt;p class="note"&gt;&lt;strong&gt;Note:&lt;/strong&gt; If <code data-dev-comment-type="c">#getDefault()</code> is used to instantiate this
        manager on a multi-SIM device, this operation may fail sending the MMS message because no
        suitable default subscription could be found.
[Android.Runtime.Register("sendMultimediaMessage", "(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/PendingIntent;)V", "")]
public void SendMultimediaMessage (Android.Content.Context? context, Android.Net.Uri? contentUri, string? locationUrl, Android.OS.Bundle? configOverrides, Android.App.PendingIntent? sentIntent);
[<Android.Runtime.Register("sendMultimediaMessage", "(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/PendingIntent;)V", "")>]
member this.SendMultimediaMessage : Android.Content.Context * Android.Net.Uri * string * Android.OS.Bundle * Android.App.PendingIntent -> unit

Parameters

context
Context

application context

contentUri
Uri

the content Uri from which the message pdu will be read

locationUrl
String

the optional location url where message should be sent to

configOverrides
Bundle

the carrier-specific messaging configuration values to override for sending the message.

sentIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is successfully sent, or failed The result code will be Activity.RESULT_OK for success or one of these errors:<br> MMS_ERROR_UNSPECIFIED<br> MMS_ERROR_INVALID_APN<br> MMS_ERROR_UNABLE_CONNECT_MMS<br> MMS_ERROR_HTTP_FAILURE<br> MMS_ERROR_IO_ERROR<br> MMS_ERROR_RETRY<br> MMS_ERROR_CONFIGURATION_ERROR<br> MMS_ERROR_NO_DATA_NETWORK<br> MMS_ERROR_INVALID_SUBSCRIPTION_ID<br> MMS_ERROR_INACTIVE_SUBSCRIPTION<br> MMS_ERROR_DATA_DISABLED<br>

Attributes

Exceptions

if contentUri is empty

Remarks

Send an MMS message

<p class="note"><strong>Note:</strong> If #getDefault() is used to instantiate this manager on a multi-SIM device, this operation may fail sending the MMS message because no suitable default subscription could be found. In this case, if sentIntent is non-null, then the PendingIntent will be sent with an error code RESULT_NO_DEFAULT_SMS_APP. See #getDefault() for more information on the conditions where this operation may fail. </p>

Java documentation for android.telephony.SmsManager.sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent).

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.

Applies to

SendMultimediaMessage(Context, Uri, String, Bundle, PendingIntent, Int64)

Send an MMS message

        Same as <code data-dev-comment-type="c">#sendMultimediaMessage(Context context, Uri contentUri, String locationUrl,
                  Bundle configOverrides, PendingIntent sentIntent)</code>, but adds an optional messageId.
[Android.Runtime.Register("sendMultimediaMessage", "(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/PendingIntent;J)V", "", ApiSince=31)]
public void SendMultimediaMessage (Android.Content.Context context, Android.Net.Uri contentUri, string? locationUrl, Android.OS.Bundle? configOverrides, Android.App.PendingIntent? sentIntent, long messageId);
[<Android.Runtime.Register("sendMultimediaMessage", "(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/PendingIntent;J)V", "", ApiSince=31)>]
member this.SendMultimediaMessage : Android.Content.Context * Android.Net.Uri * string * Android.OS.Bundle * Android.App.PendingIntent * int64 -> unit

Parameters

context
Context

application context

contentUri
Uri

the content Uri from which the message pdu will be read

locationUrl
String

the optional location url where message should be sent to

configOverrides
Bundle

the carrier-specific messaging configuration values to override for sending the message.

sentIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is successfully sent, or failed The result code will be Activity.RESULT_OK for success or one of these errors:<br> MMS_ERROR_UNSPECIFIED<br> MMS_ERROR_INVALID_APN<br> MMS_ERROR_UNABLE_CONNECT_MMS<br> MMS_ERROR_HTTP_FAILURE<br> MMS_ERROR_IO_ERROR<br> MMS_ERROR_RETRY<br> MMS_ERROR_CONFIGURATION_ERROR<br> MMS_ERROR_NO_DATA_NETWORK<br> MMS_ERROR_INVALID_SUBSCRIPTION_ID<br> MMS_ERROR_INACTIVE_SUBSCRIPTION<br> MMS_ERROR_DATA_DISABLED<br>

messageId
Int64

an id that uniquely identifies the message requested to be sent. Used for logging and diagnostics purposes. The id may be 0.

Attributes

Remarks

Send an MMS message

Same as #sendMultimediaMessage(Context context, Uri contentUri, String locationUrl, Bundle configOverrides, PendingIntent sentIntent), but adds an optional messageId. <p class="note"><strong>Note:</strong> If #getDefault() is used to instantiate this manager on a multi-SIM device, this operation may fail sending the MMS message because no suitable default subscription could be found. In this case, if sentIntent is non-null, then the PendingIntent will be sent with an error code RESULT_NO_DEFAULT_SMS_APP. See #getDefault() for more information on the conditions where this operation may fail. </p>

Java documentation for android.telephony.SmsManager.sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent, long).

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.

Applies to