1. Hot New Devices! HTC One M9 | Samsung Galaxy S6 | LG G4

Pausing with headset button on epic! - fully working!Tips


  1. nadav

    nadav Member

    DISCLAIMER: I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR PHONE.

    I know this is my first post and this might even belong in a different thread, but I think that this thread will help so many people that I am writing a new thread. This is one thing that has really annoyed me on the epic (as a previous iPhone user and a heavy music listener).

    If you follow these instructions, the headset button will play/pause and skip tracks. I am running the leaked froyo and it does answer and hang up calls (long press rejects call) but my friends running 2.1 report that in a call it only mutes the microphone and unmutes. Some of my friends on 2.1 also tell me that while this works for pausing it doesn't seem to play after that. More on that later.







    YOU MUST BE ROOTED FOR THIS TO WORK! (Sorry for those of you who are not)

    1. If you're not rooted, root. (This will void your warranty, do this at your own risk.)

    2. You will need some kind of root file explorer with a text editor (I personally use "root explorer" off the market, very simple and great interface).

    3. From the root directory, go to system/usr/keylayout and you will see a file called sec_jack.kl. You need to open this file in a text editor. Don't forget to mount R/W. In root explorer, hold down the file and scroll down to "open in text editor."

    4. It will show something like this: "Key 248 SEND_END".
    You want to change this to "Key 248 HEADSETHOOK WAKE_DROPPED"
    (The amount of spaces you use doesn't matter, but use at least one and make sure you use underscores where specified.) (Additionally, if you are running 2.1, you may want to change this to "Key 248 MEDIA_PLAY_PAUSE WAKE_DROPPED" instead; scroll down to the bottom of this post to see why.)

    5. Save changes. I would delete the backup file it creates, but this is not necessary (I like to keep my root directory clean).

    6. You probably should remount the directory as read only again.

    7. Reboot your phone. Changes only take effect then.





    That's it!

    Now there are some things you need to keep in mind:

    Different Media Players:

    There are only 2 media players this works on so far (along with those that have some kind of "override headset controls" feature, more on that later) and those media players are the stock one, and music mod (free from the market). If you are using a media player that has a override headset button (like PlayerPro, TuneWiki, PowerAmp) the button will only control that application and in calls it will play music if you hit it.
    This is why I recommend Music Mod - better than stock player but doesn't interfere with controlling calls like other media players, and if the headphones accidentally come out of your phone while you're listening to music, Music Mod will pause your music, while the stock music player has no option of the sort.

    Those of you running android 2.1
    This doesn't work on Eclair as well as it does on froyo, and I heard that it will only pause, not play music. Additionally, it only mutes/unmutes in calls, doesn't answer/reject/end them.
    A workaround for this on 2.1 is to change the file to "Key 248 MEDIA_PLAY_PAUSE WAKE_DROPPED" instead of HEADSETHOOK. This will play/pause in 2.1 properly but still won't help you with calls.

    If you are worried that upgrading to froyo may kill your gps, use this link (gps on froyo is actually much more accurate, I get like 2-4 meter locks): http://androidforums.com/samsung-ep...froyo-flash-patch-tether-functioning-gps.html

    I hope this helps all of you out there.

    Enjoy

    Advertisement
    Boogerwooger and zjunk like this.
  2. CrozB

    CrozB Member

    Can you make that in to a Cab File? :rolleyes:

    Sometimes I miss WinMo!

    Thanks for the above though. I might give it a shot.
  3. zjunk

    zjunk New Member

    This is brilliant - thank you. One question - do you know the command word to make it mute during a phone call? I'm on a Samsung Vibrant 2.2, and I would really like this to be a designated mute button (I am on a ton of conference calls for work, etc,). I followed your directions all the way in to HEADSETHOOK, but I don't know if it's now "HEADSETMUTE" or something similar. Thanks in advance.
  4. Boogerwooger

    Boogerwooger Member

    Hey Nadav,

    Just wanted to say that after this long time, I've rooted and everything works brilliantly after following your instructions.

    I'm using Winamp as the player, btw, but will try out Music Mod.



    There is one other curious thing that I'd like to address now... (call it a "challenge" :))


    I like to listen to both music and Podcasts, though I prefer to have them as 2 separate widgets. Right now, I'm using "Headset Button" with the commands:

    Middle Button (the only button on my headset mic) >
    One Click = Play/Pause
    Click Hold = Next Track

    This isn't anything fancy, but something that's simple enough to do without having to mistakenly press the wrong amount of times.



    As I mentioned, I ALSO have the podcast widget of the App "Doggcatcher"
    This is a player where I get to download podcasts. It's easy on my screen to turn off the music widget and turn on the podcast one, but when I don't have my screen on, I wish there could be a way for me to turn the podcast widget off and then on.



    Ideally it would be this:

    One Click = Play Winamp + Pause Winamp, Doggcatcher and any other audio service I'd be running, like Google Music, etc)

    Click Hold = Next Track (Winamp)
    Three Clicks = Play Doggcatcher Podcast
    Four Clicks = Play Google Music or another one.


    Notice that in this scenario, the necessary thing is to have one click pause anything. I'm frequently in a situation where someone wants to talk with me. If I'm playing music, it's A OK w/ the one click, but I still need to manually go into Doggcatcher to pause.

    Though 3/4 Clicks to play the audio Doggcatcher and/or another App isn't as easy, I won't be doing it as often as turning on the music (once again, the pausing is more important.



    STUFF I TRIED SO FAR:



    • Universal Muting App
      • Not good since it only mutes, letting all the sounds keep running
    • Tasker
      • Though it looks like they give options to make it work, and my Headphone Button App even has "Tasker Task" in it's command list, I don't think I did it correctly as it doesn't pause the app.
      • You can try Tasker out to do this if you're interesed to see if it can work. I've only started to use it so perhaps there's a key part that I'm missing
  5. justlovejoy

    justlovejoy Well-Known Member

    well i have the 3 button headset with mic. one on bottom i believe is 248 but can i add the buttons for up volume and down volume cause the seem to be un-responsive but sometimes will function like 248...

Share This Page