I\'m working on functionality that detects currently active audio output device. I\'m using AudioManager\'s registerAudioDeviceCallback method for that
AudioManager
registerAudioDeviceCallback