“Love” tracks on last.fm with one click of a headset button

April 30th, 2011 by Strawp

Here’s a handy little trick for keen last.fm users on Android that lets you mark the current track as “Loved” with a headset button combination. What you will need is:

  1. The official Last.fm client for Android
  2. Tasker
  3. Headset Button Controller
  4. A headset remote button or the headphones that probably came with your phone if it’s got buttons on it

Set up last.fm

Nothing much to do other than log in and make sure your media player of choice scrobbles tracks correctly. I’m using Winamp which works fine, but make sure you’ve turned on scrobbling in the settings. The last.fm widget has a “love” icon which due to the awesomeness of Android’s intents architecture we will be calling on. Add the widget somewhere on your home screen and make sure that bit works.

Create a “Love Track” task in Tasker

In Tasker, click “Tasks” -> “New Task” (call it “Love Track”) and in the task edit window add “Misc” -> “Action Intent” and in the “Action” setting, enter “fm.last.android.widget.LOVE”. Leave the other fields blank and make sure “Target” is set to “Broadcast Receiver”. You could also add an action which says “You love this track” by using “Misc” -> “Say”.

Start a track playing and come back to the edit screen and then hit “Test”. The last.fm app should create a little toast notification (one line of text overlayed on the screen) saying the track has been marked as played. After a short while it should appear in your last.fm profile.

Optional: Create a home screen shortcut

Long-click on a space on your Android home screen and choose “shortcuts” -> “Task” -> “Love Track”. You can now click on that to mark the currently playing track.

Headset button controller

Headset button controller is a stupendously useful app that allows you to assign actions to headset buttons. If your headset only has one button this is great because you can do more than answer/hang up and play/pause by assigning double, triple, quadruple and long-click actions to a button.

Once you’ve installed this set up your usual button actions, simply set one to “Tasker Task” -> “Love Track” and you’re done!

Comments are closed.