I am working on TweetComposer from Twitter Kit. As far as I know, TweetComposer only provides an image URI.
How can I use this URI get images into a Drawable or Asset?
I am working on TweetComposer from Twitter Kit. As far as I know, TweetComposer only provides an image URI.
How can I use this URI get images into a Drawable or Asset?
Not sure if this is still actual but anyway...
Create Bitmap
file from your drawable resource with BitmapFactory.decodeResource()
, then save it to some temporary file is some way like this:
String filename = "temp_image.png";
FileOutputStream fos;
fos = openFileOutput(filename, Context.MODE_PRIVATE);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.close();
Then use Uri.fromFile()
to get Uri
.