Update the Poweramp Playlist

919 Views Asked by At

I am trying to update the proprietory Poweramp Playlist from an android playlist.

I have

  • the Poweramp database structure

  • Poweramp content:// uris to select from

  • managed to complete the first step which is to add the new android playlist name into the Poweramp playlist table.

  • the actual file name of the track

I need to obtain:

  • the track_number by querying the folder_files table

I intend to do this by supplying "name" which is the actual file name.

This is how I go about it:

    ContentResolver resolver = context.getContentResolver();
    Uri pampuri= Uri.parse("content://com.maxmpz.audioplayer/FOLDER/");
    String projection[] = {"_id","name","track_number" };
    String where = "name = ?";
    String [] whereVal = "<actual file name as found on sdcard>";
    Cursor pmpcursor = resolver.query(pampuri , projection, where, whereVal, null);

Update: further investigations show that some action takes place in invoking the Poweramp provider:

I have explicitly stated:

Uri pampuri= Uri.parse("content://com.maxmpz.audioplayer/FOLDER/42742/78682");
Cursor pmpcursor = resolver.query(pampuri , projection, null, null, null);

which results in some error. The trace shows the following:

Activity Manager - Start proc com.maxmpz.audioplayer.altunlock for content provider Activity Thread -com.maxmpz.audioplayer.altunlock/com.maxmpz.audioplayer.unlock.DataProvider: pid=22736 uid=10055 gids={1015, 3003, 3002}

Publishing provider - com.maxmpz.audioplayer: com.maxmpz.audioplayer.unlock.DataProvider

Database Utils - Writing exception to parcel

Database Utils - java.lang.NullPointerException

Database Utils - at com.maxmpz.audioplayer.unlock

Database Utils - at com.maxmpz.audioplayer.unlock.DataProvider.query(":40)

Database Utils - at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:173)

Any ideas ??

1

There are 1 best solutions below

1
On

After a lot of research and going round in circles, turns out that with the current Poweramp api, you can not update the playlist. Update: oct 2018, issue now resolved. The latest poweramp release candidate allows insertions.