I am sending long SMS messages in Android using the following code:
SmsManager sms = SmsManager.getDefault();
ArrayList<String> parts = sms.divideMessage(message);
sms.sendMultipartTextMessage(phoneNumber, null, parts, null, null);
The problem is that on phones pre Lollipop 5.0 (mainly noticed on Kitkat 4.4) the SMS is being sent as two separate SMS rather than a joined (multipart) message.
On phones that are running Lollipop 5.0+ the message is correctly sent as a long SMS?
I have tested this on two exact same model phones one running 4.4 Kitkat and the other updated with 5.0 Lollipop and the same behaviour described above occurs? Has anyone else noticed this or found a resolution?
When a message is long enough, typically more than 160 characters, it's sent as separate SMS messages, and on GSM networks a bit of extra meta data is added called a User Data Header (UDH) that tells the receiver that the separate messages should be combined.
What you want to happen is for the receiver to combine them back into a single message. Note that it's the receiver that combines them, so that's where you need to be looking. As far as I know, the behaviour of sendMultipartTextMessage in Lollipop is the same as in KitKat.