Fun with Android intents and Spotify

29 Mar 2013

I was taking a look on how to make my life easier with Llama. I wanted to start Spotify when my phone connected to the Bluetooth adapter in my car, so instead of using the default “Launch Application” feature from Llama, I started looking around on how to improve it. I always start my starred playlist. So, I could directly show it by adding an Android Intent with the following parameters:


Or the equivalent, with ADB:

adb shell am start -a android.intent.action.VIEW spotify:user:ereslibre:starred

Taking a deeper look I could start to directly play something (note that not my starred playlist) using the feature:

adb shell am start -n "" -a -e query "artist:heroes del silencio"

I also managed to fake play/stop key presses, this one is trivial:

adb shell input keyevent 126
adb shell input keyevent 86

I’d be glad to hear from you if you manage to directly play your starred playlist, so I could even save a tap on my phone after getting into the car.

comments powered by Disqus