Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder);
//初始化光标
Cursor cursor = context.getContentResolver().query( MediaStore.Audio.Media.EXTERNAL_XONTENT_URL, null, null, null, MediaStore.Audio.Media.DEFAULT_SOET_ORDER);
//获得相应信息的办法
歌曲ID:MediaStore.Audio.Media._ID
Int id = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID));
歌曲的名称 :MediaStore.Audio.Media.TITLE
String tilte = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
歌曲的专辑名:MediaStore.Audio.Media.ALBUM
String album = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
歌曲的歌手名: MediaStore.Audio.Media.ARTIST
String artist = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
歌曲文件的路径 :MediaStore.Audio.Media.DATA
String url = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));
歌曲的总播放时长 :MediaStore.Audio.Media.DURATION
Int duration = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));
歌曲文件的大小 :MediaStore.Audio.Media.SIZE
Int size = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE));