4

In Tasker, there is a Media Control action which allows me to move to the next song however it only seems to work for the default Android player.

Is it there a way to hook Spotify up to do this?

5 Answers 5

5

Yes it is possible, but using Tasker's built in Media Control Next will not work.

For the action you need to use Script --> Run Shell, and as the command enter "input keyevent 87" without quotes. This is the Android API:

https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_MEDIA_NEXT

3
  • thanks, this works. although it only seems to work sometimes for me. I think it only works if Spotify is already booted up
    – Diskdrive
    Commented May 25, 2013 at 13:26
  • Couldn't you insert an action to open spotify before issuing the command to guarantee that spotify is open? I suppose if you're actively using some other app then this would be annoying but just an idea not an answer. Commented Jun 25, 2013 at 17:29
  • I made it open the app, wait 10 seconds, run the shell command (I had to run as root to work). It's working fine for me.
    – euDennis
    Commented May 28, 2014 at 18:20
3

The link says how to get tasker to make spotify play:

Getting Spotify to play.

  • Click the “+” icon at the bottom.
  • Select the “System” category.
  • Select “Sent Intent”
  • Set these fields:
    • Action: com.spotify.mobile.android.ui.widget.PLAY
    • Cat: None
    • Package: com.spotify.music
    • Target: Broadcast Reciever

From spotify's Manifest.xml I can see that there is also a com.spotify.mobile.android.ui.widget.NEXT action so I would guess that if you used that instead of com.spotify.mobile.android.ui.widget.PLAY then it would play the next track.

1
  • This worked perfectly for me, how did you explore that manifest? I need to do the same for Audible :)
    – mjsr
    Commented Aug 23, 2015 at 14:04
1

Don't ask me how, but this worked for me:

  1. Installed Spotify, iHeart and Poweramp. Disabled BT control for Poweramp.
  2. Disabled Google Play Music. Google Now still works normally.
  3. Using the Action Box extension, I stop all music by playing a 1 second MP3 of silence in Poweramp.
  4. Tasker's Play and Next actions work fine with Spotify or iHeart. I haven't figured how the phone decides which one to start. But I don't care :-) HTH
0

Maybe... WaveControl says it can control Spotify and has Tasker integration. I'm not a Spotify user, though, and it's much too late to check it out right now.

-1

Mybe this can help you :

http://androidtrix.wordpress.com/2013/11/05/tasker-spotify-plug-load-and-play/

Greetings

1
  • 1
    An answer with no useful information except a link to somewhere else is not a good answer. It's hardly an answer at all.
    – ale
    Commented Apr 6, 2014 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .