Hi,
I have developed an app that sends sms messages using Pending Intent
and a broadcast receiver to show the result code. Everything is
working fine on the emulator and on any device, except for a Samsung
Galaxy S II. On the BroadcastReceiver I'm getting the error code :
SmsManager.RESULT_ERROR_GENERIC_FAILURE. What does it mean? What can
be done to solve it?
Basically, this is my code:

public void sendSMS(String phoneNumber, String message) {
                BroadcastReceiver sentReceiver;
                BroadcastReceiver deliveredReceiver;
                String SENT = "SMS_SENT";
                String DELIVERED = "SMS_DELIVERED";

                PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new
Intent(SENT), 0);

                PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 
0,new
Intent(DELIVERED), 0);
                registerReceiver(sentReceiver, new IntentFilter(SENT));
                registerReceiver(deliveredReceiver, new 
IntentFilter(DELIVERED));

                SmsManager sms = SmsManager.getDefault();
                sms.sendTextMessage(phoneNumber, null, message, sentPI,
deliveredPI);
        }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to