Simple question, is there any way to read bytes/data from the headphone jack of an android phone? I know HTC made an app that lets headphones act as an antenna and gets Radio that way, but do i have to use native C++ for that or what? What i want to do is attach a double throw switch to the headphone jack and i want my phone to detect if the switch is pressed or not. Any way to do this??? I can tell this won't be an easy feat, but i've probably been through far worse.
Edit: even if it was the USB jack, i wudnt mind that either. I just want to attach a switch to my phone and use a program to detect if it's on or off