Hi
Anyone could tell me how to detect when a jack of an earpiece is plugged-in into an ipad or iphone?
Thanks
Hi
Anyone could tell me how to detect when a jack of an earpiece is plugged-in into an ipad or iphone?
Thanks
I believe you can call AudioSessionGetProperty and then get the value "kAudioSessionProperty_AudioInputAvailable" to detect whether an audio jack has been plugged in.
I.e.
AudioSessionInitilize(NULL, NULL, NULL, NULL);
UInt32 propertySize, micConnected;
AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable, &propertySize, &micConnected);