Created
June 27, 2015 14:23
-
-
Save ar-android/38cc699d0d8d6164ac7d to your computer and use it in GitHub Desktop.
Send 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
public void sendEmail(String string1){ | |
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); | |
emailIntent.setType("application/image"); | |
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{string1}); | |
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Test Subject"); | |
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "From My App"); | |
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///mnt/sdcard/Myimage.jpeg")); | |
startActivity(Intent.createChooser(emailIntent, "Send mail...")); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment