9

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

David Hayes
  • 7,402
  • 14
  • 50
  • 62
  • i dont see why someone would downvote this question. it's a very valid one. – GR7 Feb 12 '13 at 07:24
  • I wondered why it got downvoted too, sure it's a short question but it's to the point and I couldn't/can't find a definitive answer – David Hayes Feb 12 '13 at 14:30
  • I'm about to start doing WP8 Development David..so while I'm not able to answer the question, I hope someone does soon. Good luck. – GR7 Feb 12 '13 at 20:21
  • I was hoping to make a very similar app, did you get anywhere? I found you can't do anything towards this app, you can't run the app in the background and you're not allowed to intercept SMSes, so it seems like it's a no go. – Jamie Kitson Nov 01 '13 at 00:15
  • Additionally my Lumia 1020 has an FM radio, the FM radio app uses the headphones as an areal and gives a warning when they are unplugged, so I guess it must be able to tell when they are unplugged. – Jamie Kitson Nov 01 '13 at 10:21
  • I've created a suggestion for this: http://windowsphone.uservoice.com/forums/101801-feature-suggestions/suggestions/4861212-read-speak-sms-when-headphones-plugged-in- – Jamie Kitson Nov 01 '13 at 10:35
  • My Lumia 1020 now gives me the option to read text messages when my headphones are plugged in under Settings -> Speech. – Jamie Kitson Mar 11 '14 at 15:18

2 Answers2

3

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

Rob.Kachmar
  • 2,129
  • 1
  • 18
  • 23
0

No you can't.

See these google results:

  1. http://answers.microsoft.com/en-us/winphone/forum/wp8-wpmusic/volume-change-and-headphone-detection-in-wp8/c9ddac53-b55b-4aaf-85ef-e208d69c1c0a
  2. http://social.msdn.microsoft.com/Forums/uk/wpdevelop/thread/7a0766ad-a2c0-4e98-88f8-80e88fa1a175
Alastair Pitts
  • 19,423
  • 9
  • 68
  • 97
  • Nothing massively conclusive but it's all pointing towards a no. It's very annoying since clearly the SMS/speech function uses this somehow – David Hayes Feb 12 '13 at 02:55
  • if it isn't possible, then how does the Beats audio feature gets enabled on my HTC 8x when headphones are plugged in? there's got to be a way – GR7 Feb 12 '13 at 06:55
  • My guess is that it's a HTX 8x specific thing – Alastair Pitts Feb 12 '13 at 22:22
  • Also, as I say in my comment above, the FM radio on my Lumia 1020 knows whether the headphones are plugged in. – Jamie Kitson Feb 06 '14 at 10:19