获取本地的音文件请查看 http://blog.csdn.net/zdnuist/article/details/42393947
获取专辑图片主要是通过album_id进行查询,因此首先获取album_id
String album_id = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
Sdcard上的专辑图片存储位置为 /storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/
接下来获取album_art
private String getAlbumArt(int album_id) {
String mUriAlbums = "content://media/external/audio/albums";
String[] projection = new String[] { "album_art" };
Cursor cur = this.getContentResolver().query(
Uri.parse(mUriAlbums + "/" + Integer.toString(album_id)),
projection, null, null, null);
String album_art = null;
if (cur.getCount() > 0 && cur.getColumnCount() > 0) {
cur.moveToNext();
album_art = cur.getString(0);
}
cur.close();
cur = null;