androidsmsconcatenation

Is it possible with concatinated data-SMS in Android?


Is the functionality for fragmentation and reassembling concatenated SMS messages built in for the sendsendDataMessage() and the sendTextMessage() ?

In other words; If I put a arraybyte over 200 bytes as input to the sendDataMessage, will it be fragmented and reassembled automatically, so the getUserData() will give the same 200 bytes?


Solution

  • No, it couldn't. The maximum SMS message size is 140 bytes, even if when you use SmsManager.sendDataMessage().

    So you need to set a loop to handle your multipart sms. Maybe you also need SmsManager.divideMessage(String text) to do several fragments.

    Please refer to this problem: http://www.anddev.org/networking-database-problems-f29/npe-from-smsmanager-senddatamessage-t49916.html

    BTW, so I think just for this reason, Google choose to open this API: SmsManager.sendMultipartTextMessage()