Jump to content

How to pause playback with tasker


UnimatrixZero

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...