Aoryouncellvan Aoryouncellvan - 1 month ago 11
Android Question

No application can perform this action, when send email

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

Answer

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.