Sending Data Messages
You can send binary data via SMS using the sendDataMessage method on an SMS Manager. The sendDataMessage method works much like sendTextMessage, but includes additional parameters for the destination port and an array of bytes that constitutes the data you want to send.
Listing 12-18 shows the basic structure of sending a data message.
LISTING 12-18: Sending SMS data messages Available for Intent sentIntent = new Intent(SENT_SMS_ACTION);
('wrox°comn PendingIntent sentPI = PendingIntent.getBroadcast(getApplicationContext()
short destinationPort = 80;
smsManager.sendDataMessage(sendTo, null, destinationPort, data, sentPI, null);
Post a comment