I\'ve been working on an app that sends SMS-messages. The problem I have is that the sendTextMessage method sends two messages with the same content. How do I fix that?
This code will print out "SMS sent" when an activity returns, not when the sms is actually sent.
public void onReceive(Context context, Intent intent) {
switch (getResultCode()){
case Activity.RESULT_OK:
Log.i(TAG,"SMS sent");
break;
So what's probably happening is that another activity you have running is exiting and then returning RESULT_OK. I can't really tell though since I can see how you set up your broadcast receivers to receive.
Problem was the firmware as reported in the answers above.