I've a circuit that makes sounds through an a standard audio jack (3.5mm) and I would like to connect it to a smartphone (let's say iPhone).
When I connect it to an iPhone, it will be detected as headphones, so it would listen not only to my circuit but also on the iPhones built-in mic. If I take my jack and connect it to a microphone - it would detect a HeadSet connection and then listen only on the audio jack mic input. If I substitute the microphone with a resistor - it loses that detection and goes back to headphones (my assumption was it detects resistance. probably was wrong).
Any ideas how a smartphone would detect a microphone connected and how that could be simulated?
Many thanks!