2

I'm building an application that edits tags on mp3 files using JAudioTagger. The only problem is that the mp3 file's fileds don't change when i open the file in Google Music app.

            TagOptionSingleton.getInstance().setAndroid(true);
            File tempFile = new File(Environment.getExternalStoragePublicDirectory("smoething"), songname + ".mp3");
            AudioFile audioFile = AudioFileIO.read(tempFile);
            Tag tag = audioFile.getTag();
            tag.setField(FieldKey.ARTIST, "artist"); // when i open music app the artist is "unknown"
            audioFile.setTag(tag); // even without this i'm getting the same result
            audioFile.commit();        

According to this answer the code should be working fine but for some reason it doesn't. Does someone have a clue what i have done wrong?

Community
  • 1
  • 1
ben
  • 1,064
  • 3
  • 15
  • 29

1 Answers1

2

So i found out that the problem was with the method commit() (it just didn't worked) so i used AudioFileIO.write(audioFile) instead that does the same thing.

ben
  • 1,064
  • 3
  • 15
  • 29