Querying Google Play Music database in Android

后端 未结 3 825
不知归路
不知归路 2021-02-03 10:18

I am trying to query for the playlists created by \"Google Play Music\" app but haven\'t been able to do so. I created a playlist using locally stored content. I used the follow

3条回答
  •  迷失自我
    2021-02-03 11:13

    Try this.

    String[] proj = {MediaStore.Audio.AudioColumns.TITLE,MediaStore.Audio.Media.ARTIST,MediaStore.Audio.Media._ID};
    Uri gMusicUri = Uri.parse("content://com.google.android.music.MusicContent/audio");
    Cursor cursor = getApplicationContext().getContentResolver()
                .query(gMusicUri,
                        proj, null, null, null);
    

提交回复
热议问题