Posted by Роман on March 31, 2012
Remove/delete song by pressing headset button on Android
Posted under Phone
When I listen to music during my workouts, sometimes a song comes up which I don’t like. I can press a headset button to skip it, but really I’d like to delete it forever. So far I haven’t found a single music player which allows to remove song by pressing headset button.
Turns out it is possible with Tasker and (Headset Button Controller or Headset Droid) and rooted phone.
- Create a Tasker task “Move song” by clicking button with “lightning”. Add action “Misc – Run shell”.
- In “Command” field paste:
mv "$(lsof -p $(pidof mediaserver) | grep -m 1 MY/music/ | awk '{print substr($0, index($0,$9))}')" /sdcard/trash
/ - “Use Root” must be checked.
- In you headset control app bind Tasker task “Move song” to a single/double/etc. click.
“MY/music/” is a substring of the full path to my music folder. You can change it to “mp3” or substring of you music path.
/sdcard/trash/ target folder for music I decided to delete.
More about How to find a song currently playing
August 4th, 2013 at 7:14 pm
Is there any way i can do the above thing without rooting my phone?
October 15th, 2013 at 2:01 am
hello!
can u make “your code” + next song?