Skip to content

Instantly share code, notes, and snippets.

@holmes
Last active December 18, 2015 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holmes/5768944 to your computer and use it in GitHub Desktop.
Save holmes/5768944 to your computer and use it in GitHub Desktop.
Send an email
public void fireEmailIntent() {
Uri uri = Uri.parse("mailto:holmes@squareup.com");
Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
intent.putExtra(Intent.EXTRA_CC, new String[]{"pay@squareup.com"});
intent.putExtra(Intent.EXTRA_TEXT, "\n--\nSent from Android 101, c/o Franklin");
intent.putExtra(Intent.EXTRA_SUBJECT, "$25");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment