Fun with Android intents and Spotify

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:

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

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

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.

So you want to code for CyanogenMod ?

We are living weird days. got compromised, and with it, all git repositories went down. It’s down for good, down for maintenance, reinstall and to be audited. But, for some cleaning reasons in the day that everything was put offline I cleaned up my android project folder. “Ok ! No worries ! CyanogenMod should have all repos mirrored !”. Well… yes… no.

So instead of bitching around, just put hands to work, and do some modifications on the ‘repo’ helper script in order to fetch sources from wherever it can. It’s only a temporary fix until the situation gets normalized.

Now, let’s say we are building CM from scratch for Ace (HTC Desire HD). The instructions are very similar to what you can find on the official wiki.

The Install the Repository section needs a bit of tweaking:

So now you only need to proceed normally and start hacking.