title: How to wait for email intent to finish and get result?
body: <p>In my Android app, I am able to programmatically open up the default email editor with To, Subject, and Message using the following:</p>
  
  <pre><code>Intent emailIntent=new Intent(Intent.ACTION_SEND);
  emailIntent.putExtra(Intent.EXTRA_EMAIL, toemail);
  emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
  emailIntent.putExtra(Intent.EXTRA_TEXT, body);
  emailIntent.setType("text/plain");
  emailIntent.setClassName("com.android.email", "com.android.email.activity.MessageCompose");
  startActivity(emailIntent);
  </code></pre>
  
  <p>This works great, but I need to wait in my app until the user finishes with the email screen and also know whether the email was sent or discarded.</p>
  
  <p>Anyone know how to do this?</p>