Last Updated: February 25, 2016
·
459
· spcoder

Open (g)mail app in android to let users write an email

I use this code to let the users have some sort of "in app" support with me (the developer).

Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(Uri.parse("mailto:youremail@example.com"));
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "the subject");
startActivity(intent);