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:

I make the text file with sample text before sending. This need to make this sample works. The full MainActivity.java is:

Read more…