Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, text.getText());
sendIntent.setType("message/rfc822");
startActivity(Intent.createChooser(sendIntent, "Send email with"));
this was my code.
I tried the send mail in emulator. But it shows the no application can perform this action. if anyone knows means tell me
Thanks in advance
You need to use text/plain
intent.setType("text/plain");
Also, the Intent.ACTION_SEND
is made for sharing, you may want to use Intent.ACTION_SENDTO
to only get the list of e-mail clients, or avoid sharing applications such as Facebook, Twitter, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With