Hello,
I've been trying to send a file as an email attachment. My program
creates the file (a .csv file), and attempts to send it using a mail
client, like the gmail client. I have gotten as far as Gmail opening
up with the correct Subject and what appears to be the file attached
to it but when I send the email, it arrives with no attachment. This
is the code snippet I am using:
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_SUBJECT, filename);
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://
com.marklar.business/mimetype/sdcard/Accounts.csv"));
i.setType("text/csv");
startActivity(Intent.createChooser(i, "Email file"));
I have seen two other programs that can add attachments to the gmail
client, Open Intents File Manager and Voice Recorder. Open Intents was
even nice enough to open up the source, but after looking through it I
cannot see any differences between what I am doing and how they send
attachments. Even the Gmail screen looks identical between all three
programs, with the attachment, subject etc, but theirs actually send
the attachment whereas mine just sends the subject and body of the
email.
I've spent the last couple of days searching this group, on Google and
asking on IRC, if anyone has any ideas I would greatly appreciate it.
Thanks!
Marklar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---