Querying Google Play Music database in Android

后端 未结 3 830
不知归路
不知归路 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:00

    I know this thread is old, but I have been grappling with this problem too.

    Google Play Music exposes its playlists at this non-standard Content URI

    // list all playlists with their ID and Name
    Cursor cursor = getContentResolver().query(
        "content://com.google.android.music.MusicContent/playlists", 
        new String[] {"_id", "playlist_name" }, 
        null, null, null);
    

    The Google Play Music content provider uses the following column names

    • isAllLocal
    • playlist_owner_name
    • hasLocal
    • hasRemote
    • hasAny
    • KeepOnId
    • playlist_art_url
    • playlist_share_token
    • _id
    • _count
    • playlist_owner_profile_photo_url
    • keeponSongCount
    • playlist_description
    • playlist_type
    • playlist_id
    • keeponDownloadedSongCount
    • playlist_name

    I would have never figured this out without this really helpful app Content Provider Helper

提交回复
热议问题