I am developing an Android application for 1.6 and above that sends and receives SMS messages through a port. To send the SMS I am using the method:
SmsManager.sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
but have discovered that the byte[] data should contain only the message body. There seems to be no method available to send multi-part data messages and no way of modifying the SMS header (UDH) to specify that the messages is, say, 1 of 3.
I'm having a similar problem on the receiving end when trying to extract the message count information from the SMS I have received through the specified port. I am using SMSMessage.getPdu() to extract a byte[] containing the message header and message body but have no way of extracting the specific information from the header data. Does anyone know the format the Android platform uses for SMS headers?
Any help would be very much appreciated.