androidimagesavegallery

Image, saved to sdcard, doesn't appear in Android's Gallery app


I save an image to the sdcard and it doesn't appear in the Gallery application until I pull off the sdcard and return it back.

Do you have any idea why is it so?

Seems like the Gallery application has some cache that isn't updated on file save...

Actually, I also want to open the just-saved image in Gallery application and have no success with that
this is my question about this issue.


Solution

  • The system scans the SD card when it is mounted to find any new image (and other) files. If you are programmatically adding a file, then you can use this class:

    http://developer.android.com/reference/android/media/MediaScannerConnection.html