I have written a code in which I am allowing user to send order via email to vendor [ShopOwner] along with their personal and cart item details, but here I am getti
The error message shows:
ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND typ=text/html flg=0x1 (has clip) (has extras) }
It means that the android system doesnt found any email sending activity to handle the intent created by you. Make sure you have email application installed in your device.
Also use the following code to send email,
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"recipient@example.com"});
i.putExtra(Intent.EXTRA_SUBJECT, "subject of email");
i.putExtra(Intent.EXTRA_TEXT , "body of email");
try {
startActivity(Intent.createChooser(i, "Send mail"));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MyActivity.this, "There are no email applications installed.", Toast.LENGTH_SHORT).show();
}