D
Deleted User
Guest
I'm trying to update the genre tag of an audio file.
CODE
Other tags like Title, artist, album and art are updated, only genre doesn't work.
Edit
resolver is the ContentResolver class that provides applications access to the content model.
CODE
Code:
final Uri genreUri = MediaStore.Audio.Genres.EXTERNAL_CONTENT_URI;
String currentGenreName = MediaStore.Audio.Genres.NAME;
ContentValues values2 = new ContentValues();
values2.put(currentGenreName, genre);
String whereGenre = MediaStore.Audio.Genres._ID + "=?";
String[] whereVal2 = {Long.toString(genreID)};
resolver.update(genreUri, values2, whereGenre, whereVal2);
- genre: value from edittext (new genre name).
- genreID: genreID from selected audio file.
Other tags like Title, artist, album and art are updated, only genre doesn't work.
Edit
resolver is the ContentResolver class that provides applications access to the content model.
Code:
ContentResolver resolver = context.getContentResolver();
Last edited by a moderator: