Search code examples
androidmp3id3id3-tag

Read ID3 Tags of an MP3 file


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

Solution

  • You can get all of this using MediaMetadataRetriever

    MediaMetadataRetriever mmr = new MediaMetadataRetriever();
    mmr.setDataSource(filePath);
    
    String albumName =
         mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);