2

I know that the songs artist,album etc can be displayed by using MediaStore.Audio class. But it displays the list of artists,albums etc. The problem is when I click an artist name(displayed as list in my activity), all the songs with that particular artist should be displayed.

How can I filter the songs based on meta data (album/artist etc). How to get metadata of that particular song ?

Dileep Perla
  • 1,865
  • 7
  • 33
  • 54

2 Answers2

2

If you want to filter based on the artist that the user clicked, you need to requery the database.

Below is an example of such a query.

String query = MediaStore.Audio.Media.IS_MUSIC + " != 0 AND _display_name LIKE '%.mp3' AND artist LIKE " + artistStringHere;
0

Read through the mp3 and find the id3 and id3+. However, dealing with mp3 music usually indicates piracy.

Cole Tobin
  • 9,206
  • 15
  • 49
  • 74