aharris88/phonegap-sms-plugin — pull request #40 by complex857 (2014-10-03 19:05:37+00:00)
Title: Use sendMultipartTextMessage() if the message needs to be sent in parts

I found that if i have a long message (or a relatively short one with accented Hungarian characters) the message is not sent with empty intent while *is* sent if I use the built-in messages app (with `"INTENT"` intent).
Did some digging and found that if I use the [`sendMultipartTextMessage()`](https://developer.android.com/reference/android/telephony/SmsManager.html#sendMultipartTextMessage%28java.lang.String,%20java.lang.String,%20java.util.ArrayList%3Cjava.lang.String%3E,%20java.util.ArrayList%3Candroid.app.PendingIntent%3E,%20java.util.ArrayList%3Candroid.app.PendingIntent%3E%29) the message is sent as expected.

I only dabble in java, so please feel free to correct any obvious mistake i made. With the current implementation the `callbackContext.sendPluginResult()` (in execute) will be called multiple times since the `sendMultipartTextMessage()` [expects to receive](https://developer.android.com/reference/android/telephony/SmsManager.html#sendMultipartTextMessage%28java.lang.String,%20java.lang.String,%20java.util.ArrayList%3Cjava.lang.String%3E,%20java.util.ArrayList%3Candroid.app.PendingIntent%3E,%20java.util.ArrayList%3Candroid.app.PendingIntent%3E%29) multiple `PendingIndent`s "one for each message part" according to the docs. This does not seemed to cause a problem for me.

I've only tested it a Galaxy S2 with Android 4.4.4 (cyanogenmod).