• Announcements

    • andrewilley

      Poweramp v3 Project Update   04/24/2017

      As you may be aware, the Poweramp developer has been working hard on an updated material design user interface for Poweramp v3 which required a full ground-up rebuild of the code and is taking some time to get to a beta-test stage. See the forum thread for more details and to discuss.    
Sign in to follow this  
Followers 0
andrewilley

Help with sending Custom Intents to Poweramp

4 posts in this topic

While I know a fair bit about general use of Poweramp, I've never delved into the black arts of the API and sending Custom Intents. I've just upgraded my Samsung Note phone from KitKat to Marshmallow and so much is no longer the way I want it, or is just plain broken, including using my three-button headset +/- controls for track and album access while the phone is in my pocket.

I've found an Xposed Module (PBMC Key Chains) that with a bit of tweaking gets me 90% of the way there, and I can issue single-click MEDIA_NEXT and MEDIA_PREVIOUS key scancodes, plus use long-press for MEDIA_REWIND and MEDIA_FAST_FORWARD, which only fire while the screen is off. However there does not seem to be a key scancode that causes Poweramp to execute a Next List or Previous List action (for switching albums, folders, etc).

What I can do is issue a "Custom Intent URI" though, which means I need to work out how to format such a command (the editor for such commands is a plain text box). I believe I need to create something along the following lines:

Action: com.maxmpz.audioplayer.API_COMMAND
Extra: cmd:6     ('6' for next item in category, '7' for previous item in category)
Target: Service

Does that seem correct and complete, or have I misunderstood the docs? It doesn't seem to work when I enter that into the Custom Intent URI box anyway.

Andre

Share this post


Link to post
Share on other sites

Perhaps you are already familiar with this but I had a look in the api code and found the commands as shown in the attached screenshot:

Other commands do not appear to have been implemented

 

commands.PNG

Share this post


Link to post
Share on other sites

Yeah, the Poweramp side of things I'm able to find (it's commands 6 and 7 above that I want), it's how to actually send those intents from PBMC to Poweramp that's not quite so easy.

I created a test shortcut intent in PBMC, which correctly starts a playlist playing in Poweramp, and the created syntax looks like this:

content://com.maxmpz.audioplayer.data/playlists/14/files#Intent;action=com.maxmpz.audioplayer.ACTION_PLAY_IMMEDIATELY;launchFlags=0x20020000;component=com.maxmpz.audioplayer/.PlayListActivity;end

I'm just not sure which bits of the above to replace with the simpler commands that I need...

Andre

Share this post


Link to post
Share on other sites

So no one has any idea how to format a Custom Intent URI for sending to Poweramp?

Andre

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  
Followers 0