Jump to content

How to pause playback with tasker


Recommended Posts


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


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

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