Hey @loretod - I’ve tested this out myself and it is possible to connect a single switch to a smartphone through the headphone jack by wiring it in a specific way to a TRRS jack and using the built-in universal switch access in the phone. (This was using a Android device, a Samsung S6. The Apple authentication piece as described in this Stackflow answer may complicate things, and may explain why my colleague had some trouble with my makeshift adapter.)
You’re probably aware already, but for the benefit of others, it isn’t possible to plug an access switch with a standard mono jack (which has two connectors) directly into the headphone jack. It also appears as though the volume up and volume down or forward / reverse functions can’t be set up as universal switch inputs on most phones.
Note that there are two different standards for how the jacks/plugs are wired: OMTP and CTIA. In this case, it won’t matter as we’re using the same pins (MIC and GND). (More info: https://help.longtailproducts.com/hc/en-us/articles/207970396-Smartphone-Headset-Standards-Apple-iPhone-AHJ-CTIA-OMTP)
Most modern smartphones use four conductor jacks on their headphone jack (at least that still have headphone jacks) Android devices use the CTIA standard (TRRS is MIC, GND, RT, LT). Shorting or closing a switch between MIC and GND is interpreted as pause / play, which can be used as an universal switch input.
Soldering to existing TRRS cables / headsets can be tricky as the wires tend to be very fine. Sounds like that may be the only option for Apple devices.
For other types of phones, another option is to get your hands on a TRRS terminal block (e.g., https://www.adafruit.com/product/2914, ~$2.50 OR https://www.digikey.com/short/z41ctv) and a mono jack. Connecting the two wires from the mono jack to the Sleeve and Ring2 on the terminal block will create a simple adapter.
Once you connect an access switch to the mono jack, and plug the TRRS terminal into the phone, you’ll need to go in the Accessibility settings to set up the universal switch by pressing on the button.