简体   繁体   中英

write to external storage and send e-mail?

i have to make an application in which first i have to create a text file from the data user has entered in the UI and then send the text file as an attachment in an email. For this i will have to write data to the external directory and then pass the URI to the Intent so that the email client in the phone can read it.

i am not sure how would i:

  1. write data to the external storage.

2.Pass the URI of the file created to the Intent so that i can attach it to the email.

I have seen several examples of how to send email attachments.. but none fit my requirements hence as a last resort i am posting this question.

thank you in advance.

Both questions have been answered here many times.

External storage:

Attach a file to an email:

I honestly cannot figure out what is so specific about your requirements. It looks like a pretty standard task to me...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM