• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Creating a pause button (android buttons/headset)!

Boogerwooger

Newbie
Dec 8, 2010
12
0
NOTE: I searched this forum and didn't find any info regarding this, so I thought I'd throw in my frustration and ask for a possible way it can be fixed.

Since the problem I'm having can be dealt in two ways depending on whether or not a headset is used, I decided to split the questions up. Choose either one to answer if you can.



Pausing on the Epic

Short Question: Is there any way to create a button that will mute and pause any audio (like a song playing), and then having it be pressed again to resume the audio?



More detailed version: Let's say you're relaxing with your Epic, listening to some song or a podcast... and all of a sudden your friend comes in asking you a question. So far, you can:

  • a) Spend some time turning on your epic, moving to your player (widget or not) and pressing the pause button.
  • b) quickly pressing the volume button down.


Option A is way too slow, and option B results in having your music/audio keep on playing while you're talking with your friend.

These aren't the most serious issues ever, but it really gets annoying that you can't press any button that can quickly mute something.


Since I know that nobody can make a button appear out of thin air, I was wondering if I can throw the following out to see if anyone thinks this would be possible...


  • Can holding the volume button down be reprogrammed to pause the audio, and holding it up to play it again?
  • What about that light touch part of the camera button? As far as I noticed, the button is only activated into the camera mode when pressed all the way down. After this the "light touch" part of the button is used for focus, but other than in that mode, the light touch doesn't seem to be used at all, and can perhaps be made into a quick pause button.

----------------

Using Headphone controls to pause
THE PROBABLY BETTER ALTERNATIVE... yet with a problem still.


I have the Bose mobile on-ear headset
Bose Mobile On-Ear Headset - Mobile Phone Communication Kits - Bose Headsets and Headphones

With this guy, I'm able to talk on the phone but when I press the little pause button, it doesn't pause at all... instead takes me to the phone menu.... when I press it a second time, it makes a call to the first number in my call history, which is very annoying.


-------

I will try to find more info about this, but I hope that I don't need to pay for another headset since theoretically this one should have the pause function.

Thank you for listening, and any help would be super appreciated!
 
I know I've seen an application co-opt the camera button (Vlingo, I think?), so it has to be possible. It would have to be added to the media player application (or one of the 3rd party media player apps) and I'm not sure if you could get it to work reliably or with consistent results if the application didn't have focus (there's a lot of potential for competing actions if another app is listening for the camera button as well). The problem with convincing an app developer to add that functionality is that not every Android phone has a dedicated hardware camera button, which adds complexity to their build/tests.

Is the extra seconds it takes to pause audio from lock screen or notification bar audio controls worth a developers time and resources to add camera button control? I'm guessing it's not.
 
Upvote 0
Hi Dawankler,

Thanks for answering my first question. I guess when it comes to using the phone as it is, I will have to make use of my quick reflexes. Though this isn't a big deal since when I would listen to something I would have my headphones on.


This brings me to try and re-address the second question I had, having to do with trying to pause while using the Bose Mobile On-Ear Headset.

On my blackberry it was pausing and unpausing. Here for some strange reason, the pause button activates the call menu when pressed once, and calls the last person I talked to when pressed again. It would be better if it would open up Angry Birds, since at least I wouldn't have to apologize for calling someone again by mistake.

Thank you guys for listening, and if anyone even has a theory of why this strange things happens, please let me know!!
 
Upvote 0
Right now I'm using Doubletwist, which does a similar thing.

However this function isn't perfect either and the button on my headset just seems to hang there without being used either way.

I read of several forums that Samsung and this headset shouldn't even be compatible, but since my epic DOES play music as well as take calls using the headset, I'm sure that there must be some kind of hack that can utilize the pause button to do just that, instead of taking me to the call menu.'

Do you guys think this is probably better to be asked in the "accessories" thread, btw?
 
Upvote 0
Thank you so much, Nadav. Eventually I may root, though right now I will try to see other possible methods. If there were more reasons for me to root then I'd do it, but right now there just doesn't seem to be a strong need.

Perhaps the Froyo upgrade will fix this headphone bug, though I'm ever-so doubtful.

It's just strange when I imagine a meeting of the Samsung developers, with nobody at all addressing a problem like this.. not so much because of my headphones doing it, but when I put on the STOCK buds that came with the epic and pressed the button, it also went to the call history, then to the last call.

Mabye they secretly want people to redial their last call by mistake... it's a conspiracy I tells ya! :eek:
 
Upvote 0
You're welcome. :)

No Froyo does not fix this. I am running leaked froyo (DK28) and by default this key mapping is not enabled. This is also true for DJ29 which I have tested. This fix/mod/workaround (whatever you want to call it) works better on froyo, because on froyo the headset button will end calls whereas on 2.1 it will only mute/unmute the mic in a call (some people find this more convenient).

If I were you I would root. Not just for this. Most people say they refuse to root because of warranty... (blah blah blah). Worst case scenario, you clean wipe with odin and sprint reps will never know the diff. (Don't forget to do nandroid backups before you flash stuff and/or screw with system apps.)

By the way, this is not a bug. Samsung intentionally made the headset button do this. On a normal froyo build the headset inline button registers as "HEADSETHOOK" (I'll explain that later in this paragraph). Additionally, the stock headphones are not the issue either. Whenever you hit the inline button on any 3.5mm headset, the Epic will recognize this action as Key 248. Inside the root files (specifically the key mapping files in this case), the Epic is told that Key 248 means android command "SEND_END", which simulates the green send key (or the red end key if you're in a call) which is found on some older androids. When the android operating system registers this, it opens up the last called menu. When you hit it again it functions as the "send" key again, and calls the first number on that list. However, when you change key 248 to mean "headsethook", the android system will identify this as the default play/pause/answer/end button. By the way, you can actually remap any key to anything. You can change the whole layout of the keyboard. You can change the headset button to the camera button, or even the other way around. Every time you do this a restart is required. I thought you might like to know how this works, so there you go.
 
  • Like
Reactions: justlovejoy
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones