v66dik
v66dik

Reputation: 267

How to query for songs in playlists on Android SDK?

So my question is how to query for playlist content. I can make a query to display all the playlists, but how to make a query to display songs in a specific playlist.

Thanks

Upvotes: 7

Views: 4171

Answers (1)

v66dik
v66dik

Reputation: 267

Okay, so I have manged to put the code together myself. So this is it :

 String[] proj = {   MediaStore.Audio.Playlists.Members.AUDIO_ID,
                    MediaStore.Audio.Playlists.Members.ARTIST,
                    MediaStore.Audio.Playlists.Members.TITLE,
                     MediaStore.Audio.Playlists.Members._ID
                    };

            c = getContentResolver().query(   MediaStore.Audio.Playlists.Members.getContentUri("external",playlistID),
                    proj,
                    null,
                    null,
                    null);
            startManagingCursor(c);

Upvotes: 12

Related Questions