Read ID3 Tags of an MP3 file

Harsha M V picture Harsha M V · Jun 10, 2011 · Viewed 22.9k times · Source

I am trying to read ID3 from a mp3 file thats locally stored in the SD card.

I want to basically fetch

  1. Title
  2. Artist
  3. Album
  4. Track Length
  5. Album Art

Answer

Reno picture Reno · Jun 10, 2011

You can get all of this using MediaMetadataRetriever

MediaMetadataRetriever mmr = new MediaMetadataRetriever();
mmr.setDataSource(filePath);

String albumName =
     mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);