Jump to content
UnimatrixZero

How to pause playback with tasker

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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.

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