Questions tagged [headphones]
146 questions
66
votes
8 answers
Are headphones plugged in? iOS7
Developing an app for an iPhone with audio files that need to be listened too through headphones.
How do I check if headphones aren't plugged in so I can tell the user to plug in headphones.
I have the following code from another thread but the…

4GetFullOf
- 1,738
- 4
- 22
- 47
27
votes
3 answers
Check whether headphones are plugged in
I can't seem to find a way to know on android if the headphones are plugged in. I found various solutions but they always seem to return false.
The only thing that seems to work properly is a BroadcastReceiver, but that's not what I need:
I just…

dosse91214
- 561
- 1
- 5
- 17
24
votes
1 answer
iOS app crashes when headphones are plugged in or unplugged
I'm running a SIP audio streaming app on iOS 6.1.3 iPad2 and new iPad.
I start my app on my iPad (nothing plugged in).
Audio works.
I plug in the headphones.
The app crashes: malloc: error for object 0x....: pointer being freed was not allocated or…

Angel Martin
- 321
- 2
- 8
22
votes
5 answers
Bandwidth from headphone/microphone jack
I got interested in this after I saw Square use the headphone jack on the iPhone to send credit card data.
What's the average bandwidth of the headphone jack on the iPhone, average notebook, and average mobile device?
Can it be doubled by sending…

prafulfillment
- 911
- 2
- 11
- 26
16
votes
4 answers
Is there an event for when the headphones are unplugged?
During a test, a client noticed that video playback in the iPhone pauses when headphones are unplugged. He wanted similar functionality for audio playback, and maybe the ability to pop up a message.
Does anyone know if there's an event of some kind…

Ben Clayton
- 80,996
- 26
- 120
- 129
16
votes
3 answers
Detect if headphones are plugged in or not via C#
There is no example how to detect if headphones are plugged in or not via C#.
I assume should be some event for that...
Does make sense to use WMI?
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\cimv2",
…

NoWar
- 36,338
- 80
- 323
- 498
15
votes
7 answers
Reacting to multi-buttons wired headphones
I am driving some experiments with a pair of a-JAYS Four headphones (having 3 buttons on its wired remote/mic) plugged onto a Galaxy Nexus (ICS 4.0.2).
My issue is that only the middle button is 'recognised' by a test app I have written, i.e.…

Attila
- 503
- 1
- 5
- 20
14
votes
2 answers
How to get notifications when the headphones are plugged in/out? Mac
I'd like to get notified when headphones are plugged in or out in the headphone jack.
I've searched around for this on stackoverflow but I can't seem to find what I'm looking for for the Mac, I can only find for iOS.
So, do you have any ideas on how…

Pedro Vieira
- 3,330
- 3
- 41
- 76
14
votes
4 answers
Sending Data through Headphone jack in Android phones
I'm currently dealing with a new project and I have to send data through headphone jack with specific voltage, then i can work on that voltage.
so here i need to program the specific voltage depends on my data. is it possible that i can access the…

Payam Mohajeri
- 165
- 1
- 1
- 10
12
votes
3 answers
How To Get Electric Power From Head Phone Jack?
My quest is if anyone knows how to create an Android app that can send electric charge through the device's headphone jack, like in this video iPocket_LED. The video shows an app for iPhone that controls a LED plugged into the headphone jack.
I want…

Leirbag Onerom
- 121
- 1
- 1
- 3
9
votes
4 answers
Detecting if headphones are plugged into iPhone
Does anyone know if you can detect if headphones are plugged into the iPhone, and if they aren't - disable sound from your application.
I think I could manage disabling sound, but the detection part I have yet to find anything on.
Thanks

ingh.am
- 25,981
- 43
- 130
- 177
9
votes
2 answers
How to difference headphones from integrated audio in PC
I am using amazing NAudio framework to get the list of the audio devices.
But as I see is impossible difference which audio device is PC's integrated audio and which is a headphones. I mean they have the same name and only if we plug the headphones…

NoWar
- 36,338
- 80
- 323
- 498
9
votes
2 answers
Remote Control event in iOS with Swift
Trying to figure out how to read the Apple headphone's volume buttons to use as a trigger for the camera shutter (as the Apple Camera app does).
From the documentation on Remote Control Events,
Remote Control Received With Event, and this git…

Cody
- 721
- 7
- 15
9
votes
2 answers
Can you tell whether headphones/headset are plugged in WP8
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
9
votes
2 answers
Event headphone jack ( Windows XP ) with Realtek ALC888
How to detect event headphone jack inserted/removed on Realtek ALC888?
Is there any SDK or lib?
Global question: how to detect this same event under Windows XP?
Global answer: not exist universal solution. But, Realtek audio know. How?

DQuade
- 303
- 3
- 10