write to external storage and send e-mail?
i have to make an a开发者_C百科pplication 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:
- 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:
How can i Use External Storage in android
How should I refer to "external storage" in the UI on Android?
Attach a file to an email:
Trying to attach a file from SD Card to email
Android:Attach file with email from device memory
I honestly cannot figure out what is so specific about your requirements. It looks like a pretty standard task to me...
精彩评论