Android.Telephony.Gsm.SmsManager.SendDataMessage Method
Send a data based SMS to a specific application port.

Syntax

[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)

Parameters

destinationAddress
the address to send the message to
scAddress
is the service center address or null to use the current default SMSC
destinationPort
the port to deliver the message to
data
the body of the message to send
sentIntent
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
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").

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif destinationAddress or data are empty

Remarks

Send a data based SMS to a specific application port.

[Android Documentation]

Requirements

Namespace: Android.Telephony.Gsm
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1