I am making an app that allows the user to share an image using android intent but how to get that URI of
a bitmap without need to saving it to sd card
I have used this code that works fine, but I don't need to save this bitmap to sd card
private Uri getImageUri(Context inContext, Bitmap inImage) {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
String path = Images.Media.insertImage(inContext.getContentResolver(), inImage, "title", null);
return Uri.parse(path);
}
I need to get that URI without saving that bitmap to sd card