AgoraIO-Extensions / Agora-Flutter-SDK

Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows

Home Page:https://pub.dev/packages/agora_rtc_engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agora_rtc_engine setRouteInCommunicationMode not Working

dpatel-jac opened this issue · comments

Hello Agora Team,

In my system I need to provide option for changing audio route between default Speaker, handset or bluetooth device. As per sdk documentation setRouteInCommunicationMode used for setting audio route. but it will not working for me.

Here is some sample code how I can change communication route. In my case onAudioRoutingChanged method not called means it indicate that no audio routing updated. As per SDK logs it will attempt to set with proper route but platform responds with default route 0. method '_setRouteInCommunicationMode_46f8ab7'

if (currentOutput.value == SupportedDeviceType.speaker) {
      _engine.setRouteInCommunicationMode(2).then((value) {
        currentOutput.value = SupportedDeviceType.headset;
      });
    } else if (currentOutput.value == SupportedDeviceType.headset) {
      _engine.setRouteInCommunicationMode(3).then((value) {
        currentOutput.value = SupportedDeviceType.speaker;
      });
    }

Anyone can help me?

Can you share the API logs?

@littleGnAl Please check SDK logs when I attempt to setting communication mode.

I/spdlog (21226): [2024-04-09 15:40:05.097] [21226] [info] [iris_rtc_api_engine.cc:343] api name RtcEngine_setRouteInCommunicationMode_46f8ab7 params "{"route":2}"
I/spdlog (21226): [2024-04-09 15:40:05.099] [21226] [info] [iris_rtc_api_engine.cc:407] api name RtcEngine_setRouteInCommunicationMode_46f8ab7 result 0 outdata {"result":0}

I/spdlog (21226): [2024-04-09 15:40:15.054] [21226] [info] [iris_rtc_api_engine.cc:343] api name RtcEngine_setRouteInCommunicationMode_46f8ab7 params "{"route":3}"
I/spdlog (21226): [2024-04-09 15:40:15.056] [21226] [info] [iris_rtc_api_engine.cc:407] api name RtcEngine_setRouteInCommunicationMode_46f8ab7 result 0 outdata {"result":0}

As per log it indicate that I am attempt to set route 2 or 3 but it take route 0 as default.

Which platform you are facing this issue on, can you fill in more details by following this template first? Thanks.
https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml

I am facing issues for both android & IOS

Please submit a ticket to Agora Support for further investigation of this issue. If you have any conclusions, you can share them here which may help other developers. Thanks!

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.