You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a problem。When I connect to Bluetooth before a call, the first call will go to the phone and the second call will go to Bluetooth。
core.reloadSoundDevices();
List AudioDevices = Arrays.asList(core.getExtendedAudioDevices());
AudioDevice inOutputDevice = null;
for (AudioDevice audioDevice : AudioDevices) {
if (audioDevice.hasCapability(AudioDevice.Capabilities.CapabilityPlay)) {
if (audioDevice.getType() == AudioDevice.Type.Headset || audioDevice.getType() == AudioDevice.Type.Headphones) {
inOutputDevice = audioDevice;
break;
} else if (audioDevice.getType() == AudioDevice.Type.Bluetooth || audioDevice.getType() == AudioDevice.Type.BluetoothA2DP) {
inOutputDevice = audioDevice;
break;
}
}
}
if (inOutputDevice == null) {
Log.e(TAG, "usbOutputDevice is null");
} else {
LogUtils.logToFile("耳机设备222222 ===== " + inOutputDevice.getDeviceName() + "-" + inOutputDevice.getType() );
Log.e(TAG, "usbOutputDevice is not null: type === " + inOutputDevice.getType() + " name === " + inOutputDevice.getDeviceName());
if (core != null && core.getCurrentCall() != null) {
core.getCurrentCall().setOutputAudioDevice(inOutputDevice);
core.getCurrentCall().setInputAudioDevice(inOutputDevice);
}
}
this is my code,I don't know how to solve it。the linphone sdk version is 5.2.99
The text was updated successfully, but these errors were encountered:
I had a problem。When I connect to Bluetooth before a call, the first call will go to the phone and the second call will go to Bluetooth。
core.reloadSoundDevices();
List AudioDevices = Arrays.asList(core.getExtendedAudioDevices());
AudioDevice inOutputDevice = null;
this is my code,I don't know how to solve it。the linphone sdk version is 5.2.99
The text was updated successfully, but these errors were encountered: