UnimatrixZero Posted July 28, 2020 Share Posted July 28, 2020 Hi, i have a cheap china phone as music and audiobook player. After 90min tasker sends a command to a raspberry pi that turns off my speakers and pause the playback with the command input keyevent KEYCODE_MEDIA_STOP This doesn't work with Poweramp. So how can i stop playback with tasker? Can i send an intent? Link to comment Share on other sites More sharing options...
andrewilley Posted July 28, 2020 Share Posted July 28, 2020 Max will know the specific answer, but have you tried KEYCODE_MEDIA_PAUSE ? Check PA Settings > Headset/Bluetooth > Last Processed Commands to see if PA is receiving it. Andre Link to comment Share on other sites More sharing options...
UnimatrixZero Posted July 28, 2020 Author Share Posted July 28, 2020 Works PAUSE. Thanks. Link to comment Share on other sites More sharing options...
UnimatrixZero Posted July 31, 2020 Author Share Posted July 31, 2020 It only works when the display is on. The speakers are connected with a normal audio jack cable and i control the play with the three buttons on the cable. I have tested pausing the playback and the "Last Processed Commands" are Quote 07:06:49.242 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_HEADSETHOOK ACTION_DOWN name=ACCDET source=0x101 virt=false repeat=0 actionTime=28620480 playerState=1 ================== 07:06:49.243 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_HEADSETHOOK ACTION_UP name=ACCDET source=0x101 virt=false repeat=0 actionTime=28620480 playerState=1 ================== 07:06:49.851 PlayerService TOGGLE_PLAY_PAUSE from PSMediaButtonReceiver pausePlaying Can i create a task from this commands? Pausing the player using the pause buttons works also when the display is off. Link to comment Share on other sites More sharing options...
maxmp Posted July 31, 2020 Share Posted July 31, 2020 @UnimatrixZero yes, sure: https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_lib/readme.md Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.