Share via


SmsManager.DownloadMultimediaMessage Method

Definition

Overloads

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

Download an MMS message from carrier by a given location URL

        &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 downloading the MMS message because no
        suitable default subscription could be found.
DownloadMultimediaMessage(Context, String, Uri, Bundle, PendingIntent, Int64)

Download an MMS message from carrier by a given location URL

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

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

Download an MMS message from carrier by a given location URL

        &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 downloading the MMS message because no
        suitable default subscription could be found.
[Android.Runtime.Register("downloadMultimediaMessage", "(Landroid/content/Context;Ljava/lang/String;Landroid/net/Uri;Landroid/os/Bundle;Landroid/app/PendingIntent;)V", "")]
public void DownloadMultimediaMessage (Android.Content.Context? context, string? locationUrl, Android.Net.Uri? contentUri, Android.OS.Bundle? configOverrides, Android.App.PendingIntent? downloadedIntent);
[<Android.Runtime.Register("downloadMultimediaMessage", "(Landroid/content/Context;Ljava/lang/String;Landroid/net/Uri;Landroid/os/Bundle;Landroid/app/PendingIntent;)V", "")>]
member this.DownloadMultimediaMessage : Android.Content.Context * string * Android.Net.Uri * Android.OS.Bundle * Android.App.PendingIntent -> unit

Parameters

context
Context

application context

locationUrl
String

the location URL of the MMS message to be downloaded, usually obtained from the MMS WAP push notification

contentUri
Uri

the content uri to which the downloaded pdu will be written

configOverrides
Bundle

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

downloadedIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is downloaded, or the download is 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 locationUrl or contentUri is empty

Remarks

Download an MMS message from carrier by a given location URL

<p class="note"><strong>Note:</strong> If #getDefault() is used to instantiate this manager on a multi-SIM device, this operation may fail downloading the MMS message because no suitable default subscription could be found. In this case, if downloadedIntent 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.downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, 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

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

Download an MMS message from carrier by a given location URL

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

Parameters

context
Context

application context

locationUrl
String

the location URL of the MMS message to be downloaded, usually obtained from the MMS WAP push notification

contentUri
Uri

the content uri to which the downloaded pdu will be written

configOverrides
Bundle

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

downloadedIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is downloaded, or the download is 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 downloaded. Used for logging and diagnostics purposes. The id may be 0.

Attributes

Remarks

Download an MMS message from carrier by a given location URL

Same as #downloadMultimediaMessage(Context context, String locationUrl, Uri contentUri, Bundle configOverrides, PendingIntent downloadedIntent), 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 downloading the MMS message because no suitable default subscription could be found. In this case, if downloadedIntent 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.downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, 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