Spotify on Lollipop

401 views
Skip to first unread message

Phil

unread,
Feb 25, 2015, 7:01:13 PM2/25/15
to tas...@googlegroups.com

I was a long time user of Media Utilities to control Spotify and Google Music, however since upgrading to Lollipop, Media Utilities no longer works (crashes often even when not in use) and since the project seems abandoned I figured I should come up with another solution.  I have a workaround but it's crude by using several different actions: 

1) Launch App- Spotify
2) Send an intent to search for my playlist
3) Use AutoInput to press the "pause/play" button
4) if the above fails (since it might not be displayed) use AutoInput to press the "Shuffle play" button

The one caveat, the play button at #3 might not correspond to the playlist at #2 (but if the shuffle play is pressed it will play the playlist from #2).  
I can live with this, definitely, but was wondering if there is a better approach.  A lot of the resources on the net wrt Spotify intents are outdated and most of what I tried failed.

Thanks,

Phil

MikeV

unread,
Feb 27, 2015, 12:55:35 PM2/27/15
to tas...@googlegroups.com
I was using Tasker to do this as well until Media Utilities decided it wasn't going to play with Lollipop.

I found a simple, non-Tasker solution that seems to work fine. It's an app called Bluetooth Connect and Play: https://play.google.com/store/apps/details?id=com.cp2.start.and.play.music.player

Works great ... 
Message has been deleted

Phil

unread,
Feb 28, 2015, 6:04:25 PM2/28/15
to tas...@googlegroups.com

Awesome, thanks for the recommendation Mike.  I'm installing it now, so hopefully it works great for me too. 

Phil

unread,
Feb 28, 2015, 7:46:57 PM2/28/15
to tas...@googlegroups.com

The app shows promise but needs a Tasker plugin such that I can tell it which music service to play. Currently, it seems to relate the service to the bluetooth device, which might be ideal for people who always listen to one service (or even one per device) but I listen to multiple services from the same device based on whatever mood I'm in.  Hopefully the developer will add Tasker support.

Michael

unread,
Mar 2, 2015, 4:09:05 PM3/2/15
to tas...@googlegroups.com
You can use intents to play, pause, and skip songs in Spotify: https://www.reddit.com/r/tasker/comments/2vrsu3/weekly_discussion_thread/coknbhh?context=3

MikeV

unread,
Mar 3, 2015, 12:38:58 AM3/3/15
to tas...@googlegroups.com
Michael, thanks much ... that's it. Sending the play command from an intent works great (and the other will too). Never thought to look at using the widget. 

joaomgcd

unread,
Mar 3, 2015, 5:28:47 AM3/3/15
to tas...@googlegroups.com
You can also very easily control spotify with the media intents in AutoShare available here. :)

Phil

unread,
Mar 3, 2015, 11:16:12 AM3/3/15
to tas...@googlegroups.com

I was using the AutoShare intents for the Google Music player and AutoInput for the Spotify player depending on which player I was using. Will the same AutoShare intent work on both such that whichever player I launch and send the "play" intent it will work as intended?

Thanks,

Phil

João Dias

unread,
Mar 3, 2015, 11:26:48 AM3/3/15
to tas...@googlegroups.com
Yes Phil, you can direct the same intent to different apps using the "Find Compatible Apps" option :)

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/F0i0eb5abCQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Phil

unread,
Mar 3, 2015, 3:35:54 PM3/3/15
to tas...@googlegroups.com

Cool, thanks!  Any idea how to retrieve the current track being played?  I know Media Utilities used to be able to retrieve this information and set some Tasker variables.  I'd like to duplicate this somehow with AutoShare, AutoInput or some other app but not sure how to go about it.

João Dias

unread,
Mar 4, 2015, 5:39:49 AM3/4/15
to tas...@googlegroups.com
There's no direct way right now, but you can do it with AutoNotification somewhat. Use the AutoNotification Intercept event condition and select the "Get All Fields" option. Then in the text you'll have the media info in %antexts(). Hope this helps

Phil

unread,
Mar 5, 2015, 7:35:26 PM3/5/15
to tas...@googlegroups.com

Hmmm, I usually play music and then launch a GPS app.  So the GPS app is most likely in the foreground while music is playing. Spotify shows a notification when the track changes.  Can AutoNotification detect when Spotify (or Google Music Player) outputs that notification event?  Thanks.

João Dias

unread,
Mar 6, 2015, 5:21:40 AM3/6/15
to tas...@googlegroups.com
yes it can. Use the AutoNotification Intercept event condition that will trigger on notification change

Phil

unread,
Mar 6, 2015, 11:10:43 AM3/6/15
to tas...@googlegroups.com
Awesome!  Thanks, I'll give it a shot.  Another $1.50 or so coming your way since I don't have AutoNotification yet (just AutoLocation, AutoInput and AutoShare).

Fabian Rumer

unread,
May 22, 2015, 7:50:20 AM5/22/15
to tas...@googlegroups.com
I have two questions:
I don't understand the difference of using the AutoShare plugin vs. the "standard" send intent option in Tasker. Whats de difference?
Thanks for the info concerning copying URI and using.
Now I want to send an intent to shuffle play all my songs in my personal collection.
I cant find a way to copy that URI, its only possible to copy a specific Song URI, Playlist URI, maybe Album.etc.
Is there a way to do so?
Thanks in advance!

Marta Hintz

unread,
May 22, 2015, 9:52:23 AM5/22/15
to tas...@googlegroups.com
All the plugins in general make it easier to use Tasker. Most u can do w out plugins, but with a lot more complex code And possible root needed on phone.

Tasker Pro

unread,
May 22, 2015, 2:54:29 PM5/22/15
to tas...@googlegroups.com
To the OP's comment about the issue with starting the playlist from the beginning rather than shuffle play -

You can do this with AutoInput, since as you mention - just pressing 'Play' with AutoInput rarely starts the playlist from the beginning, instead playing whatever song was last played, and you can easily click "Shuffle" but to start the playlist from the beginning -

Try using AutoInput > Click > Type:List > Value:3

And if 3 doesn't work, try other values. ALSO, the new AutoNotification beta can press any button on any 'widget' type notification in the status bar, even with the screen OFF or LOCKED!

What this means is that - when Spotify is running with it's little widgety thing in the status bar, you can pull all that data into Tasker, and also use Tasker to press Play/Pause, Skip Forward/back, anything that can be pressed in the status bar can now be pressed with Tasker (whereas before it had to be a standard-type notification button). To access this get the AN beta, then run the AN Query, and specify Spotify and all the button ID's will come back in a new array field named %aninternalactions() so to skip forward you'd use AN>Action %aninternalactions(5). It may differ based on device so sometimes you got to experiment with the element number in the array until you get the button action you want.
Reply all
Reply to author
Forward
0 new messages