我正在對Android的MediaStore文件數據庫查詢 - MediaStore.Files.getContentUri("external")
- ,對於某些特定的文件夾,無論是MediaStore.MediaColumns.TITLE
和MediaStore.MediaColumns.DISPLAY_NAME
是而對於其他的文件夾爲空這個值存在。 我找不到有關MediaStore.MediaColumns.TITLE可能爲空的任何文檔。的Android MediaStore查詢MediaStore.MediaColumns.TITLE列爲空某些文件
這裏面有一些內部的android目錄,如這些:
_data: /storage/emulated/0/Music, title: null, _display_name: null
_data: /storage/emulated/0/Notifications, title: null, _display_name: null
_data: /storage/emulated/0/Pictures, title: null, _display_name: null
然而,對於一些其他文件夾,標題有:
_data: /storage/emulated/0/Android, title: Android, _display_name: null
_data: /storage/emulated/0/DCIM, title: DCIM, _display_name: null
_data: /storage/emulated/0/Download, title: Download, _display_name: null
所有數據直接從MediaStore來查詢。
我知道我可以直接與數據的工作,但我試圖根據TITLE,從而導致鑑於部分是空的不正確結果的查詢進行排序。
這是預期的行爲?如何處理它並檢索按標題正確排序的所有文件?
我想知道如果這應該是一路走來:http://stackoverflow.com/questions/8187828/sql-order-by -using-a-substring-within-a-specific-column-possible – dwbrito
您正在獲取空標題或顯示名稱? –
@HirenPatel當它爲空時,對於標題和顯示名稱都是空的。只有數據字段被填充。 – dwbrito