Send email with text file as attachment android sample

Here is little sample how to send email (send intent to Mail app) with text file as attachment. Screenshot:   And here is source code of main feature: private void sendIntentToGmailApp(File fileToSend) { if(fileToSend != null){ Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_SUBJECT, “Send Text File As Attachment Example”); email.putExtra(Intent.EXTRA_TEXT, emailBody); email.putExtra(Intent.EXTRA_STREAM, Read more…