trying to use Email intent on emulator logged in to Gmail on emulator but still, it is not connecting to Gmail.
Intent email = new Intent(Intent.ACTION_SENDTO);
email.setData(Uri.parse("mailto:")); // only email apps should handle this
email.putExtra(Intent.EXTRA_SUBJECT, "Your Order");
email.putExtra(Intent.EXTRA_TEXT,pricemessage);
if (email.resolveActivity(getPackageManager()) != null)
{
startActivity(Intent.createChooser(email, "Send Mail Using :"));
}
2
Answers
You can easily send email in android via intent. You need to write few lines of code only as given below
When I copied your code, it warned that Query Permission Needed. So, add the below code outside of tag in your manifest.xml file.
It works for me after adding it. Let me know if it works for you too.