Is it possible to tell whether the headphones are plugged in on a windows phone 8 device? I want to use the Text to Speech API but I don't want to read messages over the speaker
The audio ports detect that something has been plugged in by monitoring for a change in resistance across the port. When nothing is plugged in the resistance is infinite, but when a coil is plugged in (speaker or mic) there is now a measurable resistance, and the computer pops up and asks you what it is you plugged in.
Clean the headphone jack When you connect the headphones, the plug pushes the lint further to the bottom of the jack. If the lint is conductive, it may be messing with the electronic circuits inside the jack, causing the phone to register it as a pair of headphones plugged in.
There's usually an indication to identify an internal microphone on headphones. In most instances, it's a small hole (this may or may not have a microphone symbol next to it) located on the bottom of the ear cups.
Check the audio jack. On the back of your laptop or desktop, look for the audio output port, often labeled with a headphone or speaker icon, and make sure the headphones are plugged in.
Actually, yes you can on WP8. It's not an obvious API, but these guys figured out how to do it as long as the phone is running anything above GDR1.
http://developer.nokia.com/community/wiki/How_to_detect_the_audio_path_(headset_connection)_on_Windows_Phone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With