Where are the inline remote settings in Android? I recently purchased a set of headphones with iPhone controls. I've never had these work on Android before and was expecting to just get audio out, and lo and behold, I have media controls.

The trouble seems to be, I also have Voice Dialing, which is triggering itself anytime the headphones are plugged in. Any app playing music now also pauses and plays randomly.

I don't know exactly what's going on, but I suspect that there are 2-3 different apps all trying to do something with the headset, and it's causing problems. I don't really need it to work, but I can't find any settings dealing with the inline remote anywhere. I've been digging through the system settings and all of my app settings all day and nothing even mentions these behaviors.

I don't care if I have to recompile the kernel myself; I very much want to edit this behavior. Where do I start looking? Is the headset a hardware button? Is there a flag I can check for with an app's code that can detect when a headset with a remote is plugged in to make it do different things?
To my experience, headset control behaved randomly. Took me a couple of weeks to figure out why suddenly in my training sessions the music player started (wow! that button on the headset suddenly does something...). Like you, I never found any corresponding system settings.

To get rid of that "random system", I took a look around. As usual with Android, almost everything is triggering (or triggered by) an intent, and a listener reacts on that. If there are multiple listeners, the user will be asked with which app to perform the action -- and can declare that app the standard; which holds until a new app registers or the chosen app gets uninstalled.

That said, I went to the Playstore and took a look around -- and indeed, there are multiple apps around taking care of the button-presses: Single press, double, triple, long-hold, klick-and-hold... I never imagined how much to do with a single button :D Unfortunately for me, I could not yet convince the one app I tried to behave as intended -- except for single click and single hold (i.e. play/stop/take-call and volume-up) -- but that may be due to the combination of headset/phone/app, and I certainly will try to figure this out by evaluating different apps.

To give you a starting point: there's e.g. JAYS Headset Control, which I currently use. Though highly configurable1, see above for my problems (Philips plugs, Motorola device). Then there's also Headset Droid which looks quite promising2, but costs about EUR 2. This seems to support multiple buttons even, from the screenshots.

 

Then there are Headset Button Controller (also about EUR 2), Philips Headset (free -- the next one I should try with my Philips headset), and a lot more -- just search the playstore for "headsetbutton"...