title: Sending SMS via an Intent and know if the SMS has been sent or not
body: <p>I tried to send an sms via an Intent with this code:</p>
  
  <pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setData(Uri.parse("smsto:" + phoneNumber));
  intent.putExtra("address", phoneNumber);
  intent.putExtra("sms_body", messageBody);
  intent.putExtra("exit_on_sent", true);
  startActivityForResult(intent, CODE);
  </code></pre>
  
  <p>Then, I want to know if the SMS has been sent or not and I use this code:</p>
  
  <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent intent) {
  
      switch (requestCode) {
  
          case CODE:
          if (resultCode == Activity.RESULT_OK)
          {
              //Then do...
          }
          elseif(resultCode == Activity.RESULT_CANCELED)
          {
              // Do...
          }
          break;    
      }
  }
  </code></pre>
  
  <p>The thing is the result is always 0 (Activity.RESULT_CANCELED), even when the SMS has been sent. How can I know if the SMS has been sent or not ? I want to use the SMS default app of the phone, not create an interface that sends SMS.</p>