My previous question (Is it possible to share an image on Android via a data URL?) is related to this question. I have figured out how to share an image from my application
Had the same problem and after lots of research and debuging here is my 5 cents: (on my android 2.3.3 and 4.2 devices)
openFile(Uri uri, String mode)
so we have to give it real URI (in projection[i] == MediaStore.MediaColumns.DATA) with read rights. query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
It is probably a hack, and wouldn't work on some sensitive data, but you can make file.setReadable(true, false);
on internal file somewhere in your code and facebook will be able to see and send the img. No need for android external storage permissions. Probably there is no need for content provider if img will be readable. Can just send link in Intent. But i had strange google+ preview bechavior without provider so decided to keep it. Don't have lots of devices to test and use only Twitter, FB , Google+ ,Skype, Gmail. Works fine for now
Here is GitHub Demo: