Jump to content
Poweramp

incutonez

New Members
  • Content count

    1
  • Joined

  • Last visited

About incutonez

  • Rank
    Newbie
  1. incutonez

    How to Update the Poweramp Playlist in android

    @TheoKlink, do you think you could provide some guidance? I was able to import the library doing import com.maxmpz.Poweramp.player.PowerampAPI; but now I think I've hit the same issue that you have... I can't actually query the table, but I think that's because I'm passing the wrong column ID... not sure what the column name is. final String idKey = MediaStore.Audio.Playlists._ID; final String nameKey = MediaStore.Audio.Playlists.NAME; final String[] columns = { idKey, nameKey }; // I think I'm using the wrong column names here... what should I use? // Getting the playlists here works though, and I can display them in a ListView final Cursor playLists = resolver.query(PowerampAPI.ROOT_URI.buildUpon().appendEncodedPath("playlists").build(), columns, null, null, null); ... public Uri getPlaylistUri() { return PowerampAPI.ROOT_URI.buildUpon().appendEncodedPath("playlists").appendEncodedPath(Long.toString(getPlaylistId())).build(); } public Cursor createPlaylistCursor(String sort) { Log.d("BLAH", getPlaylistUri().toString()); // this looks like it logs the proper path "content://com.maxmpz.audioplayer.data/playlists/8" return getContentResolver().query(getPlaylistUri(), null, null, null, sort); // This crashes the app with Unknown URI content://com.maxmpz.audioplayer.data/playlists/8 }
×