Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about bluetooth #456

Open
gaoruiqing187 opened this issue Nov 27, 2024 · 1 comment
Open

about bluetooth #456

gaoruiqing187 opened this issue Nov 27, 2024 · 1 comment

Comments

@gaoruiqing187
Copy link

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

@Viish
Copy link
Member

Viish commented Dec 2, 2024

Hi @gaoruiqing187,

This repository is only for issues related to the app itself, otherwise please open your issue in linphone-sdk and attach logs.

Cheers,

@Viish Viish transferred this issue from BelledonneCommunications/linphone-android Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants