views:

171

answers:

1

I'm using the following to initiate the sending of an email:

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc882"); 
i.putExtra(Intent.EXTRA_EMAIL, new String[]{s});
startActivity(Intent.createChooser(i, "Send mail..."));

The problem that I'm having is that (on my phone) it pulls up Gmail's Compose window instead of allowing me to choose which email client I'd like to send the message with.

Am I doing this wrong, or does the default email client just not respond to email send intents?

+1  A: 

It might not respond to message/rfc882 Intents. Try text/plain instead, if you can, as I'm pretty sure that works.

CommonsWare
Stupid me... I *thought* I'd tried that already, but it turns out I typed in `plain/text` instead of `text/plain`. Sigh.
fiXedd
Actually, that might indirectly be my fault. There's a snippet from AndroidSnippets.org that I sometimes point to and clip from, and *that* has plain/text instead of text/plain. Odds are, you got the typo from there.
CommonsWare
Maybe... I can't remember. I DID google around for it, but that was a week or two ago.
fiXedd