title: check if sms was sent in android?
body: <p>I want to check if the message was delivered or not. 
  if message was not delivered due to cellular signal problem i would make a toast that says "No simcard signal try again"</p>
  
  <p>This is my code in MainActivity.java</p>
  
  <pre><code>public void sendSMSMessage(String to, String message) {
      try {
          SmsManager smsManager = SmsManager.getDefault();
          smsManager.sendTextMessage(to, null, message, null, null);
          Toast.makeText(getApplicationContext(), "Sent!", Toast.LENGTH_LONG).show();
      } catch (Exception e) {
          Toast.makeText(getApplicationContext(), "Failed!", Toast.LENGTH_LONG).show();
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Thanks. Adios</p>