I know that some devices headphone ports (maybe all of them? any reference here would be good) have 3 channels, for stereo sound and microphone. So I was wondering if it's possible to detect something like this pedal on these devices.
If it's possible, using the audio recorder would be enough? I'm studying possibilities for an app here, and this sounds promising if possible.