If I create a temporary file in the application cache directory, I cannot, for example, send it as an attachment. This is because another application does not have permission to read the file.
In API 9 and above, I can set the file to be readable with setReadable (true, false). Unfortunately, I am targeting API level 7+. I donโt want to rely on having an SD card, so I cannot use the location returned by getExternalStorageDir () to save it if there is no card.
How can I generate and share a temporary file in a way that will work even if there is no SD card?
source share