Hi, all.
DISCLAIMER: I'm a newbie to developing native code, but have intermediate skills with C, C++ and some basic assembly.
When I bought my headphones, I had a strong possibility that the VOL UP/DOWN keys would not be recognized by Android...and I was right. Clockworkmod Recovery doesn't report any keymaps when trying them and nothing pops up from dmesg. However, the middle button is recognized as a standard headset button and plays/pauses/goes to next track as expected.
I'm thinking that this is the case because there is no driver that can recognize and, hence, map the other buttons to the keymap used by the kernel. Thus, where do I start with developing such a driver? I know I can measure voltage differences sent by the headphones, but I'm not sure where to go from there. I'm pretty sure I can get a few throwaway headphones with the Apple controls.
This can be an interesting and really, really useful hobby project.
Thanks!
Great idea!
I hate buying stuff thats "Made for iPhone/iPod"!! I almost bought Klipsch s4 instead of s4i in protest. But I needed the mic soo...
I'd really love to controll the volume with my remote, so a i really like the idea.
But i'm sorry i can't do anything to help you <.<
hmmm
I am not a developer nor do I know what I am talking about however just an idea... If you are able to measure the voltage when each button is pressed could you not use that as a signature on what button is being pressed. With that information you would be able to write an application to change the volume based on receiving that information. I know there are applications out there to manage your volume settings so I don't think it would be too much out of the question to have the driver be able to change volume based on the voltage information.
Once again I am not a developer so take whatever I say lightly.
Something likethis? or did I read your post wrong..
I'd love to see this for my Beats by Dre >.> Been waiting a long time for someone to get the volume buttons to work. Hopefully someone out there is willing to take on this project
So what I'm reading is this. What we need is an app that will measure the input of a button, and then be able to map that to a function, preferably like the stock android phones.
Because I think this should be expanded past just iphone.
I'm rather new to Android development (and development in general), so please forgive me if I'm way off here.
Android handles inputs as KeyEvents. These KeyEvents can then be mapped to actions in applications. I found an article detailing how to make custom key maps but I don't have much free time, so I've really only skimmed it.
Using the input reader found here (thanks Forge94) we can see that the center button of the iPhone controller is mapped to key 226; however, the up and down keys are not mapped to anything.
From what I can tell, we can resolve this by doing the following steps (sorry for restating your original post cnunez1987):
1. Read input from iPhone controller
2. Map input to KeyEvent
3. Process KeyEvent with an application
I would gladly do all of this, but as I said, I have almost no development experience whatsoever (a high school CS course I took last year) so I have no idea where to begin. Please let me know if I can help do this in any way.
Sounds Interesting
I have some Beats by dre and can only use the center button i would pay a few bucks to help this development!
I'm with you ejdam206 and the rest of you....this would be so awesome. I was somewhat looking into this since I use (and please don't hate) apple earbuds with mic. The problem is the volume rocker on the earbuds don't do anything but I am able to play/pause and skip/previous tracks. I would prefer to use the controls on the headset rather than turning up the volume on the phone.
Just decided to throw that in. I'm also willing to contribute to a brave dev......
linux kernel doesn't have the real control on the headset keys, in qualcomm msm series device (all htc phone), it just receive notify for key press from modem cpu (there's another os running here), it's not possible to handle new keys by just change linux kernel, even need hard ware change. you can image that it just a matrix key pad, but the line for volume up/down is not connected, so that's impossible.:-(
Sent from my Nexus One using XDA App
pengu1n said:
linux kernel doesn't have the real control on the headset keys, in qualcomm msm series device (all htc phone), it just receive notify for key press from modem cpu (there's another os running here), it's not possible to handle new keys by just change linux kernel, even need hard ware change. you can image that it just a matrix key pad, but the line for volume up/down is not connected, so that's impossible.:-(
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Wow; that's a bummer. Thanks for the tip.
pengu1n said:
linux kernel doesn't have the real control on the headset keys, in qualcomm msm series device (all htc phone), it just receive notify for key press from modem cpu (there's another os running here), it's not possible to handle new keys by just change linux kernel, even need hard ware change. you can image that it just a matrix key pad, but the line for volume up/down is not connected, so that's impossible.:-(
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
I'm on an HTC Incredible. You're saying it's possible there? Thanks.
impossible IMHO
Sent from my Nexus One using XDA App
pengu1n said:
linux kernel doesn't have the real control on the headset keys, in qualcomm msm series device (all htc phone), it just receive notify for key press from modem cpu (there's another os running here), it's not possible to handle new keys by just change linux kernel, even need hard ware change. you can image that it just a matrix key pad, but the line for volume up/down is not connected, so that's impossible.:-(
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Too bad... just got the Dre Beats.. but hey, how far are the controls on the phone vs. the headset controls? Exactly...
hello,
i have HTC Hero with Villain ROM v. 13. i need to skip to next song with long press Vol UP, and previous with long press Vol DOWN, on EELinux ROM i can make this.
please help me to modify settings so go with long press Vol UP next song.
also i have iPhone 4 headset and work only play/pause button, i need to skip song or increase volume with headset buttons.
please help me and sorry for my english.
I am surprised to see that the vol up /down buttons did anything for you with the iPhone headset, the onlything I ever saw working was the middle button witch seems to have the same effect as the middle button on the HTC Headset.
maybe If you find out the intents the buttons on each specific headset triggers you can help devs implement it.
I unfortunatly cannot do this myself as both my apple and HTC Headsets broke.
Can you actually call with the Apple Headset? For me the apple mic never worked.
PS: AFAIK there is no Setting for the wired buttons, it either works or it doesn't.
I'm not a developer and I have no intention of ever doing it, knowing whether it is possible or anything else. I was just thinking and wondering.
Since it was possible to make the hardware Camera hack.
Would it be possible to change the volume settings. For example, when the phone is locked that just pressing the up and down volume keys once only change the volume rather than holding them.
When the volume buttons would be held for more than 1-2 seconds it would possible change songs or something else, ect.
Wondering if this is possibe or not as to me, it would seem like a good idea.
Thoughts?
Can someone confirm if it's possible to change the track with the volume keys while the screen is turned off.
I can currently do this with my nexus 1 running cm7
Thanks
ddave11 said:
Can someone confirm if it's possible to change the track with the volume keys while the screen is turned off.
I can currently do this with my nexus 1 running cm7
Thanks
Click to expand...
Click to collapse
Nope. You can't. Volume keys are for volume up/down purpose only. But you can swipe the clock in the lock screen to get the music player widget, where you can change tracks.
Well it may be adjustable with CM when it comes out for the S, so I wouldn't give up hope. It's just not available in stock .
I don't get why OEMs make this a part of the stock firmware. Its a very useful feature especially when listening to spotify.
Sent from my Nexus One using XDA
Like the old Sony Ericsson Walkman phone's.
Hold up for next and down for previous.
It would be very usefull.
Hello!
I got my S3 a mount ago and I've noticed that my volume rocker is looking kind of pressed down anytime so it's not parallel with the screen, even though I've been gentle to it.
Is it just me and my OCD, or this might actually happen/that's the way it looks? I'm not having problems like a stuck button, just the way it looks. I really want to keep my phone in a good as possible state, including little things.
Thanks!
I does kinda happen. Mine has done the same. Most people for example while playing music will put the volume up one at a time so its not too loud, where as when putting the volume down people generally hold the volume key until the volume drops.
Also happens when flashing new roms through Odin and the phone needs to be put into download mode which of course is Holding power button, Home button And volume down key for 10 seconds or more sometimes, which can also cause the same effect.
Hope this helps.