My mobile app occasionally is sending text messages, everything works great on most phones but i am starting to receive emails from some users stating the messages aren't going out. Here is the code i am using:
- Code: Select all
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("+12223334444", null, "test sms", null, null);
I've read somewhere that I should use the PendingIntents, so i tried it as follows:
- Code: Select all
PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,new Intent("SMS_SENT"), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,new Intent("SMS_DELIVERED"), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("+12223334444", null, "test sms", sentPI, deliveredPI);
But it still doesnt work. So far I have gotten emails from users of Samsung Galaxy S II, Sprint Evo Shift, Samsung Sidekick phones.
Please keep in mind it's not phone specific, i have tested the app on two of these phones (my friends) and the text message was sent normally. What am i doing wrong, is there another way to send text messages that would work on all phones?
Any help is greatly appreciated


