Reputation: 239
I am using Environment.getExternalStorageDirectory()
to generate new directory (or just say a folder). It suppose to store all image generated from my app. However, I found that the folder generated by this method can't be seen in gallery. I have to use EX File Explorer or something else to check that folder. I am wondering how I can create a new directory which can be seen in the gallery?
Upvotes: 1
Views: 110
Reputation: 23269
This is probably because your new content has not been indexed yet by the MediaScanner
.
MediaScanner
scans media and places it into the MediaStore
, an internal database of metadata about media.
If you are creating new content you will need to tell MediaScanner
that it needs indexing. It should then show up in the gallery.
See my answer here: https://stackoverflow.com/a/17391679/833647
Upvotes: 1