I am developing an Android application 1.6 and above that sends and receives SMS messages through a port. To send an SMS, I use the method:
SmsManager.sendDataMessage (String destinationAddress, String scAddress, short destinationPort, byte [] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
but found that the byte [] data should contain only the message body. There seems to be no way to send multi-part data messages and not change the text of the SMS header (UDH) to indicate that the messages are, say, 1 out of 3.
I have a similar problem on the receiving side when trying to extract information about the number of messages from SMS received by me through the specified port. I use SMSMessage.getPdu () to retrieve a byte [] containing the message header and message body, but not a way to extract specific information from the header data. Does anyone know the format used by the Android platform for SMS headers?
Any help would be greatly appreciated.
source
share