我正在尝试从设备中获取所有相册并显示它。它工作正常。但是我发现专辑的艺术家在Play音乐中表现得与众不同。除了以下代码之外,还有其他方法可以获得艺术家吗?
Uri uri = MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI;
String[] cols = new String[] {
MediaStore.Audio.Albums._ID,
MediaStore.Audio.Albums.ARTIST,
MediaStore.Audio.Albums.ALBUM,
MediaStore.Audio.Albums.ALBUM_ART
};
Cursor cursor = MusicUtils.query(this, uri,
cols, null, null, MediaStore.Audio.Albums.DEFAULT_SORT_ORDER);
mArtistIdx = cursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ARTIST);
String artistName = cursor.getString(mArtistIdx);