0

Drawable drawable = getResources().getDrawable(R.drawable.im);

            bitmap = ((BitmapDrawable)drawable).getBitmap();

            ImagePath=MediaStore.Images.Media.insertImage(
                    getContentResolver(),
                    bitmap,
                    "mm",
                    "mm"
            );
            URI = Uri.parse(ImagePath);
            Toast.makeText(MainActivity.this, ImagePath, Toast.LENGTH_LONG).show();
Pro Mode
  • 1,453
  • 17
  • 30
  • You want to save image in `ImageView` right? you can't save `ImageView` as it's class – Nikhil Sep 26 '16 at 11:40
  • Try using `.getId()` , for more check this :- http://stackoverflow.com/questions/4526585/get-the-id-of-a-drawable-in-imageview That might help – Vikrant Sep 26 '16 at 11:42

0 Answers0