After looking on th e website, I was not able to find any solution to this problem. Let me explain a bit more :
I'm trying to send (programmatically) from an App a multipart SMS. It's actually working on my device (Nexus 4) but I tried it on a Galaxy Note, which convert any long-sized SMS to MMS and the app only send short SMS. Any clue about that? Does the Samsung API or something prevent the sendMultipartTextMessage() method from being executed?
In my sending function, I have Log debug, which is shown on screen, so the call to this function is well done..
Thanks for any help!
Here is the code I use :
public static void sendSMS(final Activity a, String phoneNumber, String message)
{
try {
SmsManager sms = SmsManager.getDefault();
ArrayList<String> parts = sms.divideMessage(message);
ArrayList<PendingIntent> sendIntents = new ArrayList<PendingIntent>(parts.size());
for (int i = 0; i < sendIntents.size(); i++)
{
Intent sendInt = new Intent("");
PendingIntent sendResult = PendingIntent.getBroadcast(a.getApplicationContext(), 0, sendInt, PendingIntent.FLAG_ONE_SHOT);
sendIntents.add(sendResult);
}
sms.sendMultipartTextMessage(phoneNumber, null, parts, null, null);
ContentValues values = new ContentValues();
values.put("address", phoneNumber);
values.put("body", message);
a.getApplicationContext().getContentResolver().insert(Uri.parse("content://sms/sent"), values);
} catch(Exception e) {
e.printStackTrace(System.out);
}
}