It looks like you’ll be interested in the isWiredHeadsetOn()
method and isBluetoothA2dpOn()
method of the AudioManager
class.
However, the isWiredHeadsetOn()
method is only available in Android 2.0 or later. (The isBluetoothA2dpOn()
method has been available since Android 1.5.)