[android-developers] Re: Internal Files, Email Attachments
What I ended up recommending to the customer is that she set up the
native mail application on her phone with her Gmail account, but don't
make it the default client. Then, I believe ACTION_SEND will add an
Email choice to the send options, along with Gmail. Then she should
just use Email with my app, to have her attachments handled correctly.
On May 16, 5:01 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Brion Emde wrote:
> >> I don't think FLAG_GRANT_READ_URI_PERMISSION is helping you any, since you don't have a Uri in this Intent.
>
> > It's in there, Mark. It was obscured by clouds of bad format:
>
> > sendIntent.setType("text/csv");
> > FileOutputStream fos = this.openFileOutput(FILENAME,
> > Context.MODE_WORLD_READABLE);
> > fos.write(msg.getBytes());
> > fos.close();
> > sendIntent.putExtra(Intent.EXTRA_STREAM,
> > Uri.fromFile(getFileStreamPath(FILENAME)));
> > sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
>
> Ah, sorry. That was a mile long hunk o' code...
>
> > So, to sum up: the GMail client is something different and is pretty
> > common, and we don't have the same control over it as the built-in
> > client.
>
> Well, it's certainly different. More importantly, it is proprietary,
> limiting our diagnostic capability. And, personally, I haven't
> experimented with sending email attachments, let alone through the Gmail
> client.
>
> > Is there a phone out there that wouldn't let me write a 100K file to
> > the internal file space?
>
> Only a phone that's pretty close to full.
>
> > Also, do you know if I can count on the email
> > client having finished with the file when I resume my activity that
> > kicks off the ACTION_SEND?
>
> That I don't know. It is certainly possible that it needs the file for a
> while during the actual sending operation.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Online Training: 21-25 June 2010:http://onlc.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home