Sharing with Gmail
I read through the Android Training docs recently and came across a section which I thought I could use to improve sharing on Rage Faces (by getting rid of the need for an SD card-based share system):
Write the data to a file in your own application directory using [
openFileOutput()](http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String, int)) with mode
getFileStreamPath()can be used to return a
File. As with the previous option,
Uri.fromFile()will create a
Urifor your share intent.
However, this setup fails to work with the Gmail. When you try to share with Gmail in this manner, an error message pops up in the logs:
file:// attachment paths must point to file:///mnt/sdcard. Ignoring attachment
I'm not sure why Gmail arbitrarily rejects attachments not on the SD card, but it pretty much cuts you off from sharing files with MODE_WORLD_READABLE. Unfortunately sharing with Gmail feels like an essential part of the app so I'm going to have to stick with SD card sharing.