I am designing an app in which i need to open an email client on clicking a button. The email client should be opened with a pre-defined subject and \'to\' address. Is there
Ok - now the above answer no longer works for me in year 2020. I found something mentioned on google official developer sites which worked for me.
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(Uri.parse("mailto:")); // only email apps should handle this
intent.putExtra(Intent.EXTRA_EMAIL, addresses);
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}