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/commonsguy
http://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 [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