Jump to content

Intent on NEXT/PREVIOUS track?


Recommended Posts

Hello Poweramp!

Hope you're going well. So I have my private little IceCast stream which I use Poweramp to stream through my phone. It is playing radio stations and I have a web server which has a PHP file which changes radio stations according to my custom algorithm. So what I wanted to do is: I was thinking, is there an API/Intent that Poweramp pushes whenever user clicks the Previous or Next track button in the app? So far I have only found the "TRACK_CHANGED" intent which does not fully do the job since 1) I do not know whether user clicked next or previous track, 2) it is unstable - even if I pause/replay the event kicks in - so it defeats the idea.

In Tasker, there is a Media Button State trigger but that only works for bluetooth/external hardware devices which send next/back buttons - for example if I click NEXT in Poweramp in Android Auto for example, that event does not work. So as far as my programming knowledge goes, I believe the easiest and most consisent method is that the media player application itself gives me some form of intent/reply/call when Next/Back is hit because afterall, the application knows more than any external service what user clicked. 

Is there an API/Intent that I can use to re-program the next/previous track buttons to launch my PHP script? Thank you and any help is greatly appreciated.

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...