2

i want to know if i can get mp3 file info like album name, artist, image stored in the mp3 file and more? if there an way to do this please help. by the way: i founded a Java library called Entagged but i can't use it.

Master Fakhrey
  • 157
  • 1
  • 9

2 Answers2

12

Problem solved by using MediaMetadataRetriever.

MediaMetadataRetriever mediaMetadataRetriever = (MediaMetadataRetriever) new MediaMetadataRetriever();
        Uri uri = (Uri) Uri.fromFile(mp3File);
        mediaMetadataRetriever.setDataSource(MainActivity.this, uri);
        String title = (String) mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE);
Master Fakhrey
  • 157
  • 1
  • 9
0

jd3lib is a Java library that handles MP3s, and their tags. Probably a useful starting point.

syb0rg
  • 8,057
  • 9
  • 41
  • 81