"Newer devices have microphones controlled by software, so there’s no physical switch to disable the microphone. Products like this Mic-Lock microphone blocker are designed to work around this. It’s available from Amazon for under $12.
The Mic-Lock houses a semiconductor circuit that mimics a live microphone. This disables your device’s microphone and blocks all audio. Plug it into your phone and it will think you just switched over to a headset.
The Mic-Lock even works on devices that need an adapter for a 3.5mm connection, such as a newer iPhone. “If you have a headphone jack and want an extra layer of privacy you should get it. I even tried this on a new iPhone without a jack but with an adapter and it worked,” one verified purchaser wrote.