주셔서 감사합니다. 하지만 Google Play 뮤직에는 자체 데이터베이스가 있습니다. 그래서 다른 uri와 column 이름이 필요합니다.
은 내가 다음 코드를 사용하십시오 재생 목록의 목록을 얻으려면 :
Uri playlistsUri = Uri.parse("content://com.google.android.music.MusicContent/playlists");
Cursor playlists = context.getContentResolver().query(playlistsUri, new String[]{"_id", "playlist_name"}, null, null, null);
이 그럼 당신은 기본 안드로이드 미디어 스토리지의 노래 ID 관련된 노래 ID를 얻을 수 있습니다. 그 후에는 노래를 직접 연주하거나 노래에 대한 세부 정보를 얻어 음악을 만들 수 있습니다.
Uri songsUri = Uri.parse("content://com.google.android.music.MusicContent/playlists/" + playlistId + "/members");
context.getContentResolver().query(songsUri, new String[]{"SourceId", "hasLocal"}, null, null, null);
은이 같은 것을 사용해야합니다 안드로이드에 기본 미디어 저장 장치에서 노래 정보를 얻으려면 : 첫 번째 쿼리는 하나 개의 레코드를 반환
Cursor songDetailsCursor = context.getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
new String[]{MediaStore.Audio.Media.DATA},
MediaStore.Audio.Media._ID + " = " + songId,
null, null);
. 즉, 마지막으로 생성 된 재생 목록입니다. –