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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...