Now using AudioManager's methods to detect presence of headset if API
level sufficient - isBluetoothA2dpOn() and isWiredHeadsetOn(). These are marked as
deprecated in the Android API documents, but is suggested for use by
Google's own docs (http://developer.android.com/training/managing-audio/audio-output.html).
Manifest modified to add the permission MODIFY_AUDIO_SETTINGS which is
required for isWiredHeadsetOn() to work properly.
Now using AudioManager's methods to detect presence of headset if API level sufficient - isBluetoothA2dpOn() and isWiredHeadsetOn(). These are marked as deprecated in the Android API documents, but is suggested for use by Google's own docs (http://developer.android.com/training/managing-audio/audio-output.html).
Manifest modified to add the permission MODIFY_AUDIO_SETTINGS which is required for isWiredHeadsetOn() to work properly.