What part of the Android software stack handles commands through the headphone jack? (e.g. answering calls w/ a headset)

Where does Android deal with commands sent through headsets connected through a headphone jack? Specifically, for play/pause and answering calls? Is this buried in the OS or can it be accessed through an API?

  • How can I stop auto capitalization in a html text input field on an android/samsung phone?
  • Why can't one add/remove items from an ArrayAdapter?
  • General application design (IntentService/ContentProvider/AsyncTask)
  • Request runtime permissions from v4.Fragment and have callback go to Fragment?
  • How do I get the resource id of an image if I know its name?
  • hide/show fab with scale animation
  • Related posts:

    Android Animation: Wait until finished?
    Why android onLongPress always is fired after onDoubleTap?
    Converting Bitmap in memory to Bitmap with Bitmap.Config.RGB_565
    Communicating between a fragment and an activity - best practices
    Changing the Android emulator locale automatically
    How to get the keys from ContentValues?
  • “Bitmap too large to be uploaded into a texture”
  • Populate spinner with years dynamically in Android?
  • how to use okhttp to upload a file?
  • Why is the Android emulator slow?
  • Draw text in circular view?
  • caching JSON from webservice on android - pattern?
  • One Solution collect form web for “What part of the Android software stack handles commands through the headphone jack? (e.g. answering calls w/ a headset)”

    this isn’t really related to any of the android features or capabilities, it’s just hardware related, a 3.5 doesn’t have a limited and clearly defined number of connection, you can have a jack that is mono, stereo, with 3 channels or even other configurations.

    as far as I know this kind of hardware ( the jack slot ) it’s not even named in the list of requirements for getting the Google’s commercial version of Android, so you can’t even picture a clear set of devices based on the android version that you are targeting.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.