selection = "_display_name='111'"; //I haven't use selectionArgs here for simplicity context.contentResolver.query(childrenUri, projection, selection, null, null)
我也尝试过“_display_name=?”并使用selectionags,但它看起来提供者完全忽略我的选择,总是返回目录中的所有文件。
我已经用三星S7-android8进行了测试。
假设您使用的提供程序是 androidx.core.content.FileProvider selection , selectionArgs 和 sortOrder FileProvider.query 是。。。 在AndroidX的实现中使用!
androidx.core.content.FileProvider
selection
selectionArgs
sortOrder
FileProvider.query
here (第409行)
post查询,在您自己的代码中 是的,这有点悲哀。。。