What is the String 'volumeName' argument of MediaStore.Audio.Playlists.Members.getContentUri referri

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-04-13T06:10:36Z Indexed on 2010/04/13 6:12 UTC
Read the original article Hit count: 421

Filed under:

I am wanting to query the members of a given playlist. I have the correct playlist id, and want to use a managedQuery() to look at the playlist members in question.

What I have is this:

private String [] columns = { 
     MediaStore.Audio.Playlists.Members.PLAYLIST_ID,
     MediaStore.Audio.Playlists.Members.TITLE,
     };
Uri membersUri = MediaStore.Audio.Playlists.Members.getContentUri(volume, playlistId);
Cursor tCursor = managedQuery(membersUri, columns, null, null, null);

I don't know what the volume argument needs to be. I've tried this: MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI.toString() for the "volume" argument.

That gives me back a valid content URI that looks like:

content://media/external/audio/playlists/2/members

However, my cursor comes back null. I probably am way off base -- I know what I want to do is very simple.

© Stack Overflow or respective owner

Related posts about android