Created
November 7, 2013 04:40
-
-
Save laaptu/7349058 to your computer and use it in GitHub Desktop.
Android email intent
This file contains 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.setData(Uri.parse("mailto:")); | |
intent.setType("message/rfc822"); | |
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { email }); | |
intent.putExtra(Intent.EXTRA_SUBJECT, Constants.SHARE_MSG); | |
intent.putExtra(Intent.EXTRA_TEXT, Constants.INVITE_MSG); | |
intent.putExtra(Constants.EXIT_ON_SENT, true); | |
startActivity(Intent.createChooser(intent, | |
getString(R.string.invite_via))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment