enable Automatic Audio Routing
Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices. Priorities are following:
Bluetooth (if available and AudioRoutingConfig.isBluetoothAudioManaged == true).
Wired Headset.
Default audio device if AudioRoutingConfig.useSpeakerphoneState is UseSpeakerphone.SPEAKERPHONE_TRUE or UseSpeakerphone.SPEAKERPHONE_FALSE, or Proximity sensor's based decision (speakerphone / earpiece) if AudioRoutingConfig.useSpeakerphoneState is UseSpeakerphone.SPEAKERPHONE_AUTO.
Default audio device (speakerphone/ earpiece) is set using AudioRoutingConfig.useSpeakerphoneState parameter.
Parameters
automatic routing configuration data.
See also
Throws
if AudioRoutingConfig.isBluetoothAudioManaged is set to true and android.Manifest.permission.BLUETOOTH is not granted.