The method AudioManager.isWiredHeadsetOn() is deprecated from api level 14, how do we now detect if a wired headset is connected?
we have to be using broadcast Receivers for finding the status of bluetooth connection.
Here is a good example