title: Programatically send SMS Android (Not receiving status)
body: <p>I am using <a href="http://mobiforge.com/developing/story/sms-messaging-android" rel="nofollow">http://mobiforge.com/developing/story/sms-messaging-android</a> code example word for word except for the fact that I changed:</p>
  
  <pre><code>import android.telephony.gsm.SmsManager;
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>import android.telephony.SmsManager;
  </code></pre>
  
  <p>The SMS is sending fine however I am not getting the TOAST message that it was delivered (sent to the network). I am trying to integrate SMS into my application and this is important. I am sure this can be done because how else would the stock SMS app know when to stop displaying the "sending circle". The relevant code section is as follows:</p>
  
  <pre><code>   //---when the SMS has been sent---
      registerReceiver(new BroadcastReceiver(){
          @Override
          public void onReceive(Context arg0, Intent arg1) {
              switch (getResultCode())
              {
                  case Activity.RESULT_OK:
                      Toast.makeText(getBaseContext(), "SMS sent", 
                              Toast.LENGTH_SHORT).show();
                      break;
                  case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
                      Toast.makeText(getBaseContext(), "Generic failure", 
                              Toast.LENGTH_SHORT).show();
                      break;
                  case SmsManager.RESULT_ERROR_NO_SERVICE:
                      Toast.makeText(getBaseContext(), "No service", 
                              Toast.LENGTH_SHORT).show();
                      break;
                  case SmsManager.RESULT_ERROR_NULL_PDU:
                      Toast.makeText(getBaseContext(), "Null PDU", 
                              Toast.LENGTH_SHORT).show();
                      break;
                  case SmsManager.RESULT_ERROR_RADIO_OFF:
                      Toast.makeText(getBaseContext(), "Radio off", 
                              Toast.LENGTH_SHORT).show();
                      break;
              }
          }
      }, new IntentFilter(SENT));
  
      //---when the SMS has been delivered---
      registerReceiver(new BroadcastReceiver(){
          @Override
          public void onReceive(Context arg0, Intent arg1) {
              switch (getResultCode())
              {
                  case Activity.RESULT_OK:
                      Toast.makeText(getBaseContext(), "SMS delivered", 
                              Toast.LENGTH_SHORT).show();
                      break;
                  case Activity.RESULT_CANCELED:
                      Toast.makeText(getBaseContext(), "SMS not delivered", 
                              Toast.LENGTH_SHORT).show();
                      break;                        
              }
          }
      }, new IntentFilter(DELIVERED));          
  </code></pre>
  
  <p>I am using a Jelly Bean ROM but I believe I tested this same segment a while ago on Gingerbread and ICS with the same results. Has the API changed or is there an issue with the sample? I am testing on a Sasmsung GSIII if that helps. My old tests were on an Epic.</p>