1

Environment.getExternalStorageDirectory()用来生成新目录(或者只是说一个文件夹)。它假设存储从我的应用程序生成的所有图像。但是,我发现这个方法生成的文件夹在gallery中是看不到的。我必须使用 EX 文件资源管理器或其他工具来检查该文件夹。我想知道如何创建一个可以在图库中看到的新目录?

4

1 回答 1

1

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

于 2013-07-10T18:10:24.540 回答