If I create a temp file in my application's cache directory I can't, for instance, email it as an attachment. This is because the other app doesn't have permission to read the file.
In API 9 and up, I can set the file to be world readable with setReadable(true, false). unfortunately, I am targetting API level 7+. I don't want to rely on the presence of an SD card, so I can't use the location returned by getExternalStorageDir() to store it in case no card is present.
How can I generate and share a temp file in a way that will work, even with no SD card present?