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...
Related
Hallo,
everytime one adjusts the volume of the HD2 with the devices hardware buttons, the step is very high.
I have been searching the forum, but I didn't find any solution, how to decrease the stepwidth - only have seen, that some other people have the same issue (but no solution).
Is there any possibility to manipulate the stepwitdh????
I have checked the registry and I am wondering if in one of the following reg.keys the stepwidth might be coded:
HKLM\Software\HTC\VolumeOverlay
=> I guess this is the HTC Volume control screen, which appears when you press the hardware buttons. But I have no clue if one of the entries defines the stepwitdh.
The other possibility I see here:
HKCU\ControlPanel\Volume
I would like to have some feedback, before trying to mess in the registry.
Hugo the JungleDyret
I do remember there being a fix for this, as far as I can remember it was an image that you drop and dragged into your windows folder and that some how fixes it.
I do think it's quite annoying, it's also really laggy when I hold down my volume key as opposed to tap it per each jump in volume level.
Anyway I don't know where it is but hopefully someone can post it cause I'm after it aswell
maybe you already know, but you can adjust the slider onscreen with your finger and achieve smaller steps of adjustment than can be achieved using the hardware buttons.....
@rumpleforeskin
I know that via touchscreen the volume can be adjusted finer. The issue is...
well try this, while you have your mobile in the beltpocket, listening to music.
I just want to adjust the volume in this situation with the hardwarekeys.
Hugo the JungleDyret
I don't understand why there isn't a fix for this, volumex is a commercial program that does it. But the normal volume control app is perfect, only the steps are indeed way to big...
yeah, i have the same problem i usually listen to max -1 or -2 bars (trance music) and everytime i have to resort to using fingers to slide the volume to max-1/-2. is there a way to adjust each button press = 1 bar?
Anyone know a registry fix for this?
try this, maybe it'll help
I use the iPhone headset a lot when out and about, because I don't like the being insulated from the surrondings. The iPhone headset has volume controls as opposed to the SGS2's, that only has the play/pause button. Now, I would like to know, if it's technically possible to enable support for volume control on the iPhone headset?
I understand that one would have to alter the sec_jack.kl, which is found in system/usr/keylayout/. Something like this:
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 HEADSETHOOK WAKE
key ??? VOLUME_UP WAKE
key ??? VOLUME_DOWN WAKE
However I have no clue how to find out the key mapping for the volume buttons on the remote control.
Help is much appreciated.
play/pause? take a look a the manual, i can switch tracks with my original headset.
I would HIGHLY appreciate it if this was solved. I have the Klipsch X10i headphone..amazing stuff..and the center button works, but obviously the volume buttons dont. It would be nice if it did!
SupraN0va said:
play/pause? take a look a the manual, i can switch tracks with my original headset.
Click to expand...
Click to collapse
You missunderstood, I know one can change tracks with the original headset. And even on the iPhone headset the middle button works. However, what does not work are the volume control buttons. And that's what I'd love to add sec_jack.kl file.
Changing the file won't work. Use logcat to check what keys are fired - no keys are fired in the Android system by the volume buttons. At all. So unlikely to get a fix using this method...
i got iPhone in-ear headset with one button..
but the microphone doesnt work at all in calls..
the button works 4 playing/pausing tracks..
but what to do 4 microphone..
can any1 help me plz????TIA
Did anyone ever come up with a creative solution to this?
spiicytuna said:
Did anyone ever come up with a creative solution to this?
Click to expand...
Click to collapse
The only solutions are the apps which allow you to use the middle button for volume. Volume buttons don't work.
Still no way to make it works ?
I'll really loved to...
minidou-77 said:
Still no way to make it works ?
I'll really loved to...
Click to expand...
Click to collapse
Still no way. Even the new Klipsch Android earbuds have only a single button...
FYI, the Klipsch app in market which is designed to be used with their headphones to allow multi tap of dingle button to add volume and other functionality works on non klipsch headphones also, and is free!!!!!!!
As I know there are some possibilities with re-soldering some resistor inside HF remote control.
For now there are no any messages in kernel log for Iphone's volume keys.
I know this is a resurrection of an old thread, but this is relevant current information...... The stock S4 earphones have a volume control, and I have tested them working on my S2.......
http://pages.ebay.com/link/?nav=item.view&id=121209056938
Sent from my Markox powered KitKatted S2
I haven's seen this mod on sgs2, but it would be great to swap som buttons around, especially now on the sgs3...
Unfortunately Samsung have chosen a pretty bad setup now that we're running ics on our phones. The menu button is included in most updated apps these days, so to have a dedicated hardware button for this is very counter productive. And having to hold home, wait seconds to multitask is just plain stupid.
Alas, that's the way it is.
BUT could it not be possible to mod a Rom so that the menu button brings up multitask (currently: "hold home") and holding home brings up menu?
Basically it's just a swapping of the button functions. I guess it can cause some issues with the doubble tap to "siri" voice actions, but I'd happily loose that for better multitask.
Can anybody share some advice on this? Or even create the mod?
-E
Theoretically, yes it's possible.
On my Desire only the power button could wake the phone, but I flashed a mod which enabled wake using the center button.
So for the S3, if there's a dev who wants to swap the keys, he can make one. You can try putting in a request in the Developers section a week or so from when the phone releases.
g4rvd4 said:
Theoretically, yes it's possible.
On my Desire only the power button could wake the phone, but I flashed a mod which enabled wake using the center button.
So for the S3, if there's a dev who wants to swap the keys, he can make one. You can try putting in a request in the Developers section a week or so from when the phone releases.
Click to expand...
Click to collapse
I remember when that mod came, it made using the desire a lot more efficient. It was a script edit, similar to the one for headphone button support if I remember correctly. I do think this button swapping on the sg3 will be a bit more challenging than that though, but we'll see.
I'll ask around a bit once I get the phone.
Hopefully more people than me will think this is something worth "fixing"
when screen is on, but lock screen still on, volume should work if a media player is going, but otherwise, the volume buttons shouldn't control ringer volume unless you unlock it first. I'm finding in my pocket or when I check time, volume is constantly changed to volume all the way down or all the way up. is there any way to hack a change in this behavior???
thanks ya'll
This is also happening to me a lot. I always keep my phone on vibrate while working. Come to find out my ringer is on full blast during a meeting after checking the time is no fun
noticed this also. bump bump
That would be great it sucks that it changes
Sent from my EVO using xda premium
This is one of the few things I hate about this phone.
Need mod so Volume Down does turn volume down or turn on vibrate
I hear your pain. Let's keep this thread going or make a new one for a dev to take it on.
On my OG, I used the Button Mapper app to change the Volume Down button to duplicate the Power button. Too bad it only works on Gingerbread.
Benefits of this mod being two fold:
1) To wake the device just press Volume Down. Much easier than top button.
2) When fumbling with the phone, you could not inadvertently turn the volume down and/or set it to Vibrate.
Let's hear some chatter guys.
I'll take anything to quit the pocket volume changing
Wipywd: See the original article for the Evo 4G.
http://www.pocketables.com/2010/12/how-to-remap-buttons-on-your-rooted-htc-evo-4g.html
This was the best thing since sliced bread. I saw some early traffic when the Evo LTE came out with guys trying to make a setting like this. It evolved into forward and backward for audio players. Then there was this one for Viper's ROM: http://forum.xda-developers.com/showthread.php?t=1688556
Recommendation: Change the title of the thread to:
"Dev needed to mod Volume Down button to Power function".
Let's see if we can get more interest and a dev to help us out.
Taz
Not sure if a dev with this device has looked into framework-res.apk that's most likely where this modification should take place. Then again system>usr> keylayouts etc, could be the issue. Is the issue on stock? Or on all roms?
Sent from my EVO
I think you should start a new thread to change the functionality of it, as that's probably more complex than just stopping the volume buttons while the screen is locked. the main problem is volume changed without you meaning to
wlpywd said:
I think you should start a new thread to change the functionality of it, as that's probably more complex than just stopping the volume buttons while the screen is locked. the main problem is volume changed without you meaning to
Click to expand...
Click to collapse
@wlpywd: Exactly. If you distill your issue down to the basics, I think we are asking almost the same thing. Let's figure this out for a dev to code. We have Sinistertensai's attention. Let's PM to work out the spec and post together.
Whatcha think wlpywd?
like I said, I'm all for ANYTHING that will solve this without needing to flash a whole new rom.
I can't really contribute much to any development of any kind, other than wish-listing, as my Android programming skills are just barely in the realm of existing, but I'll do whatever I can!
Hi reader xD.
So here's the thing.. I have an S3 with a nightly of cyanogenmod 13. After I installed it everything worked and was all nice and shiny. This is a kind of a backup phone that I only use sometimes specially when I want to try cyanogemod new releases. So this phone spends practically 90% of the year off. A few weeks ago, I turned it on because I was gonna set it up to loan the phone to a friend and I noticed that the volume key was not working (wasn't able to go into recovery mode). I also tried it in a music app and still could not control the volume with the button. Went to check the buttons settings and "control the volume with the button" is ticked. I also updated with another nightly through phone settings "check update".. but still.. no sings of life for the button.
So I opened the phone and took the button out.. and tried with a thin plastic tool to press directly where the volume button is placed (to check if it was a bad contact thing) and nothing happened.
I am guessing this is an hardware problem but don't know what to look for. Any suggestions on what more can I check? Any thoughts on this would be very much appreciated!
I see that I am f...ed xD.. ( T_T )
Is it possible to get into recovery mode without the volume keys? Because I would like to clean it all up.. install a cyanogenmod update and then find some kind of app to allow anyone that uses the phone to easily control de volume without those buttons and without going to the settings.. I think I've seen a forum talking about something like that.
Yes, by using either terminal ( if you have cm13 enable it in developer settings) or by using adb (adb reboot recovery). Easy. But you'd want to consider finding the component and buying it. It's cheap as chips and easy to replace. It has the volume buttons, the LED on the front and the earpiece.
西村大一 said:
Yes, by using either terminal ( if you have cm13 enable it in developer settings) or by using adb (adb reboot recovery). Easy. But you'd want to consider finding the component and buying it. It's cheap as chips and easy to replace. It has the volume buttons, the LED on the front and the earpiece.
Click to expand...
Click to collapse
Sure.. I guess I don't have much to lose if I try your suggestion. Gonna search for tutorials on how to do that and then just get my hands dirty.
Thank you!!