【发布时间】:2014-07-25 14:48:23
【问题描述】:
A 正在开发 Android 项目。 我需要提供 ContentProvider 以提供对某些目录的访问。 FileProvider 这对我来说是一个很好的解决方案。 是否可以使用 FileProvider 检索目录中的文件列表?
【问题讨论】:
-
是的,我试过了,但是只有一个示例如何获取一个具有特定名称的文件 'File imagePath = new File(Context.getFilesDir(), "images");文件 newFile = new File(imagePath, "default_image.jpg"); Uri contentUri = getUriForFile(getContext(), "com.mydomain.fileprovider", newFile);'我需要找到获取目录中文件完整列表的方法
标签: android android-contentprovider android-fileprovider