Unable to send text messages on some phones using SmsManager

Put your problem here if it does not fit any of the other categories.

Unable to send text messages on some phones using SmsManager

Postby voicely » Tue Jan 24, 2012 6:55 pm

Hello,
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 :)
voicely
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jan 24, 2012 6:44 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests