Question

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

Was it helpful?

Solution 2

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.

OTHER TIPS

  1. check folder permissions for KitKat write/read - your application can save images only in the folder that the app has created or in special shared permission folder for all apps. This is not valid for older android version
  2. You want to save image/picture/drawable/bitmap or ImageView? ImageView is not a picture
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top