Jump to content
Sign in to follow this  

Listing Poweramp playlists by name

Recommended Posts



I'm trying to make an app that would need to list Poweramp's playlists along with their names.

Querying the content provider for content://com.maxmpz.audioplayer.data/playlists returns me this:

D/Poweramp(10779): Listing playlistsD/Poweramp(10779): _idD/Poweramp(10779): 14D/Poweramp(10779): 12D/Poweramp(10779): 4D/Poweramp(10779): 2D/Poweramp(10779): 1D/Poweramp(10779): 3D/Poweramp(10779): 7D/Poweramp(10779): 8D/Poweramp(10779): 5D/Poweramp(10779): 9D/Poweramp(10779): 11D/Poweramp(10779): 13D/Poweramp(10779): 10D/Poweramp(10779): 6

Which are IDs, my question is, how do I query for the name? The database has that in the table "folder_playlists" under column "name".

Caused by: java.lang.IllegalArgumentException: Unknown URI content://com.maxmpz.audioplayer.data/playlists/11

Share this post

Link to post
Share on other sites

 public  Cursor getpampPlaylistcursor(Context context,Cursor cursor)


//              From Poweramp v2.1, playlists will be an isolated de-normalized table, which will contain track

//              data - i.e. path, track title/artist/album/duration


//              content://com.maxmpz.audioplayer.data/playlists - all playlists

//              content://com.maxmpz.audioplayer.data/playlists/ID - playlist by ID

//              content://com.maxmpz.audioplayer.data/playlists/ID/files - tracks in playlist ID


           String[] proj = { "_id", "name"};

            final     Uri playlistUri = Uri.parse("content://com.maxmpz.audioplayer.data/playlists");

            Cursor playlistCursor = getContentResolver().query(playlistUri, proj, null, null, null);

     return playlistCursor;




This is as far as I got as Poweramp does not provide anything else to allow you to write/amend playlists.


Check out my threads on this forum as this has a lot more:



Share this post

Link to post
Share on other sites

Although it is not possible to update the Poweramp playlist, I did manage to interrogate the database and return values

In its simplest form:

final String pamptrack_id = "folder_files._id";

final String pamptrack_no = "folder_files.track_number";

final String pamptrack_name = "folder_files.name";

final String pampartist = "artists.artist";

final String pampduration = "folder_files.duration";

final String pampalbum = "albums.album";

final String pampyear = "folder_files.year";

final String pamppath = "folders.path";

final String pamprating = "folder_files.rating";

final String pamptimes_played = "folder_files.played_times";

final String pamplast_played = "folder_files.played_at";

final Uri uri = Uri.parse("content://com.maxmpz.audioplayer.data/files");



public Cursor getpampTrackTrackcursor(Context context, Cursor cursor)


// gets all tracks

ContentResolver cr = context.getContentResolver();

String[] proj ={ pamptrack_id, pamprating,pamptimes_played, pamplast_played };

cursor = cr.query(uri,proj,null,null,null);

return cursor;





to see this is action

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this