Search code examples
androidbitmapandroid-gallery

Can't add imageView or bitMap to Android Gallery


I've been looking at similar questions all day, and have tried out numerous suggested functions but they don't seem to be working.

I am displaying an ImageView in an Activity, and when the user pushes a button, I want to save that ImageView in their gallery. Simple, right?

I'm new to Android so please be explicit.

Thanks


Solution

  • I found the answer using android - save image into gallery.

    The method suggested in the answer worked perfectly, but you have to make sure it's not returning null. It was doing that for me because I had no existing photo directories on the emulator I'm using. Taking a photo on the emulator solved it for me.