Is Intent.ACTION_SEND a valid intent protocol for startActivityForResult()?
<p>I want the users of my app to be able to send an email and then return to my app.</p>

<p>I've implemented this feature like below</p>

<pre><code>Intent emailIntent = new Intent(Intent.ACTION_SEND);         
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL  , new String[]{"test@gmail.com"}); 
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Message subject"); 
emailIntent.putExtra(Intent.EXTRA_TEXT   , "Message text"); 
try { 
    startActivityForResult(Intent.createChooser(emailIntent, "Send mail..."), 42);

} catch (android.content.ActivityNotFoundException ex) { 
    Toast toast = Toast.makeText(getApplicationContext(), "There are no email clients installed.", Toast.LENGTH_SHORT);
    toast.show();
} 
</code></pre>

<p>I have tested the implementation on a HTC Sensation, and it works fine, at least when selecting the Gmail app.</p>

<p>My problem is this section in the documentation for startActivityForResult()
"Note that this method should only be used with Intent protocols that are defined to return a result. In other protocols (such as ACTION_MAIN or ACTION_VIEW), you may not get the result when you expect. For example, if the activity you are launching uses the singleTask launch mode, it will not run in your task and thus you will immediately receive a cancel result."</p>

<p>I have searched for a list of intent protocols that is intended to be used from startActivityForResult() but havent found any.</p>

<p>Is there such a list?</p>

<p>Is it OK to use Intent.ACTION_SEND from startActivityForResult()? Can I expext the same behavior on all devices?</p>

<p>Thanks</p>

<p>/Mathias</p>
