Jump to content

Playlist IDs


OliverH

Recommended Posts

Hey guys,

I know there are a few posts about this but I tried it everything and I read and it still doesn't seem to work.

So, I just go a new phone and installed Poweramp and Tasker.

I have an intent configured as follows:

Action: com.maxmpz.audioplayer.API_COMMAND

Cat: None

Data: content://com.maxmpz.audioplayer.data/playlists/1

Extras: cmd:20

Target: Service


This works just fine for the first playlist.


However for the second playlist:

Data: content://com.maxmpz.audioplayer.data/playlists/2

This does not work, it keeps playing the first playlist.

I only have 2 playlists and I never created/deleted/replaced any other playlist, so theorically the IDs should be 1 and 2. Nonetheless I tried, 3, 4, 5, 6, 7, 8, 9 and 10 as well... same result.

I know there's an app called New Playlist Manager that supposedly helps finding the IDs, but this app is not finding my m3u8 playlists although I set the permissions correctly.


Any help?

Link to comment
Share on other sites

To clarify, .m3u playlists do not have an id in the Poweramp media database so you need to ensure Poweramp is able to scan the folder where you have them. It will recognise them and rebuild a new internal playlist which will have an id and will be displayed in my app

Link to comment
Share on other sites

@OliverH all those ids and other internal columns/table relations are useful and make sense only if you're developing plugin of some sort with lot of code.

If you just need to play something via simple intent API, use appropriate INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH (see https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_lib/src/com/maxmpz/poweramp/player/PowerampAPI.java#L52 for some docs clarifying how to "focus" search on the playlist name). Thanks!

Link to comment
Share on other sites

Thank you both for the replies, really appreciated!

@maxmp
So I have this playlist named "Night.m3u8" and I can play it fine using the following intent:

Action:android.media.action.MEDIA_PLAY_FROM_SEARCH 
Extra: query: Night
Package: com.maxmpz.audioplayer
Class: com.maxmpz.audioplayer.ListActivity
Target:Activity

But I don't want Poweramp to show up, so I'm trying this (like you suggested):
 

Action: android.provider.MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH
Extra: query: Night
Package: com.maxmpz.audioplayer
Class: com.maxmpz.audioplayer.StartupActivity
Target: Service

It doesn't do anything at all and I'm not sure what I'm doing wrong here...

Link to comment
Share on other sites

@OliverH use  com.maxmpz.audioplayer.PowerampAPIActivity (or broadcast receiver com.maxmpz.audioplayer.player.PowerampAPIReceiver) as target. Service has a different name and service calling is very restricted on recent Androids, thus not recommended.

 

Link to comment
Share on other sites

  • 1 year later...

 

I would like to play a playlist in 'shuffle songs' mode. The code above works perfectly for selecting the playlist but I am having difficulty figuring how how to implement the shuffle. Adding 'android.intent.extra.user_query: shuffle' to the PLAY_FROM_SEARCH action below doesn't seem to work, and I've also tried adding a subsequent intent:

 

Action: com.maxmpz.audioplayer.API_COMMAND

Extra: cmd:9

Extra: shf:2

Target: Activity

 

But this does not seem to work either.

Thanks for any pointers -

 


 

Action:android.media.action.MEDIA_PLAY_FROM_SEARCH 
Extra: query: Night
Package: com.maxmpz.audioplayer
Class: com.maxmpz.audioplayer.PowerampAPIActivity
Target: Activity

 

Edited by smiller
Link to comment
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
×
×
  • Create New...