I have a path like this:
content://media/external/audio/media/7181
That was obtained like this String mSelectedPath = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI + "/";
and then I append the song id to this.
I want to convert it into a path such as /mnt/sdcard/..
How do I do this?
Android’s media database stores the path to files in the
DATAcolumn. You can read that viaBut like @CommonsWare said it’s possible that (especially on future android versions) there is no file you can access or even no path at all, meaning the path you get might be worthless.
Luckily
ContentProviderallows you to read data with IO streams if the provider has that feature implemented (IIRC this one does). So you could read the data represented by thatUrilike in below example.