I am using Fabric in my Android app to compose tweets and I need to include an image. The TweetComposer.Builder class has an image() method that takes a Uri object. I am trying to use an image that exists in the assets directory of my app, but I keep getting an error couldn't load the image.
here is my code:
File myImageFile = new File("file:///android_asset/image/test_icon.png");
Uri myImageUri = Uri.fromFile(myImageFile);
TweetComposer.Builder builder = new TweetComposer.Builder(this)
.text("test")
.image(myImageUri);
builder.show();
In the debugger I have confirmed that the Uri was successfully created, yet it still fails to load the image. Any ideas?