In the class MediaStore.Files class, its mentioned that,
Media provider table containing an index of all files in the media storage, including non-media files.
I'm interested in querying for non-media files like PDF.
I'm using CursorLoader to query the database. The second parameter for the constructor requires an Uri argument which is easy to get for the media types Audio, Images and Video as each of them have a EXTERNAL_CONTENT_URI
and INTERNAL_CONTENT_URI
constant defined for them.
For MediaStore.Files there is no such defined constant. I tried using the getContentUri()
method but couldn't figure out the argument value for volumeName
. I tried giving "/mnt/sdcard" and also the volume name that appears when I connect the device to my system but in vain.
I saw a similar question on Google Groups but that is not resolved.
EDIT: I also tried using Uri.fromFile(new File("/mnt/sdcard/")) and Uri.parse(new File("/mnt/sdcard").toString()) but that didn't work out either.
.jpg
.avi
.mp3
but only.txt
etc ? – Quincy.jpg
,.avi
, etc. I can use the Audio, Video and Images classes. – Aindrea