I am trying to share a local image using the TweetComposer builder and using the instructions provided (https://docs.fabric.io/android/twitter/compose-tweets.html).
I have attempted to use
Uri.fromFile to share a local image, but with Android 7.1.1 I am required to use a FileProvider to expose the image externally otherwise I get an
android.os.FileExposedException. This documentation on the Android site recommends that you do not use
Uri.fromFile when sharing files between apps, and it seems they have made that a requirement with the Exception being thrown.
When I attempt to provide the TweetComposer builder with a
content:\\ URI from my
FileProvider, the image fails to load in the Twitter app (it gives a generic unable to load image Toast).
I saw a post from May 2015 that talked about the SDK not accepting
content:\\ URI’s. Have there been any updates that make it possible to use FileProvider with the TweetComposer? If not I am not sure how else to share an image with the FIleExposedException being thrown every time.