Last active
December 17, 2015 06:09
-
-
Save ookami-kb/5563304 to your computer and use it in GitHub Desktop.
Open Send email intent in android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/html"); | |
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"}); | |
intent.putExtra(Intent.EXTRA_SUBJECT, "the subject"); | |
intent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml("the content")); | |
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/file.ext")); | |
startActivity(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment