Aracılığıyla paylaş


SmsManager.SendDataMessage Method

Definition

Caution

deprecated

Send a data based SMS to a specific application port.

[Android.Runtime.Register("sendDataMessage", "(Ljava/lang/String;Ljava/lang/String;S[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "")]
[System.Obsolete("deprecated")]
public void SendDataMessage (string? destinationAddress, string? scAddress, short destinationPort, byte[]? data, Android.App.PendingIntent? sentIntent, Android.App.PendingIntent? deliveryIntent);
[<Android.Runtime.Register("sendDataMessage", "(Ljava/lang/String;Ljava/lang/String;S[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "")>]
[<System.Obsolete("deprecated")>]
member this.SendDataMessage : string * string * int16 * byte[] * Android.App.PendingIntent * Android.App.PendingIntent -> unit

Parameters

destinationAddress
String

the address to send the message to

scAddress
String

is the service center address or null to use the current default SMSC

destinationPort
Int16

the port to deliver the message to

data
Byte[]

the body of the message to send

sentIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is sucessfully sent, or failed. The result code will be Activity.RESULT_OK for success, or one of these errors: RESULT_ERROR_GENERIC_FAILURERESULT_ERROR_RADIO_OFFRESULT_ERROR_NULL_PDU. The per-application based SMS control checks sentIntent. If sentIntent is NULL the caller will be checked against all unknown applicaitons, which cause smaller number of SMS to be sent in checking period.

deliveryIntent
PendingIntent

if not NULL this PendingIntent is broadcast when the message is delivered to the recipient. The raw pdu of the status report is in the extended data ("pdu").

Attributes

Exceptions

if destinationAddress or data are empty

Remarks

Send a data based SMS to a specific application port.

This member is deprecated. Use android.telephony.SmsManager.

Java documentation for android.telephony.gsm.SmsManager.sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, 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