Looks possible but also need to check if the sound is being routed over bluetooth (but probably an edge case). http://developer.android.com/reference/android/media/AudioManager.html#isWiredHeadsetOn%28%29
Looks possible but also need to check if the sound is being routed over bluetooth (but probably an edge case).
http://developer.android.com/reference/android/media/AudioManager.html#isWiredHeadsetOn%28%29