Created
April 13, 2012 11:57
-
-
Save scruffyfox/2376347 to your computer and use it in GitHub Desktop.
Launch email
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
MailTo mail = MailTo.parse(url.toString()); | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("plain/text"); | |
if (!StringUtils.isEmpty(website) && !StringUtils.isEmpty(email)) | |
{ | |
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{email + "@" + website}); | |
} | |
intent.putExtra(Intent.EXTRA_SUBJECT, url.getQueryParameter("subject")); | |
intent.putExtra(Intent.EXTRA_TEXT, url.getQueryParameter("body")); | |
startActivity(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment