ConnectyCube / android-messenger-app

Chat and voice / video calling app using ConnectyCube
https://connectycube.com
Apache License 2.0
51 stars 23 forks source link

AudioDevice.SPEAKER_PHONE Not working on Samsung Galaxy Note20 Ultra 5G #75

Closed mwaked closed 3 years ago

mwaked commented 3 years ago

Hello,

We set defaultAudioDevice = AppRTCAudioManager.AudioDevice.SPEAKER_PHONE when starting video call and it works fine with all devices except with Samsung Galaxy Note20 Ultra 5G, we can't know the issue reason, please help us to fix this issue.

Thanks

Android Device: Samsung Galaxy Note20 Ultra 5G Android Version: 10 ConnectyCube release: 1.9.2

    //TODO:- Connectycube
    def version_connectycube = '1.9.2'
    implementation "com.connectycube:connectycube-android-sdk-chat:$version_connectycube"
    implementation "com.connectycube:connectycube-android-sdk-storage:$version_connectycube"
    implementation "com.connectycube:connectycube-android-sdk-videochat:$version_connectycube"
    implementation "com.connectycube:connectycube-android-sdk-pushnotifications:$version_connectycube"
override fun onCreate(savedInstanceState: Bundle?) {
        initSession()
        initAudioManager()
}
private fun initSession() {

        currentSession = RTCSessionManager.getInstance().currentCall

        Logger.d(CALL_TAG, TAG, "initSession, currentSession: $currentSession")

        if (currentSession != null) {
            currentSession?.addSessionCallbacksListener(this)

            RTCConfig.setStatsReportInterval(5)

            systemMessagesManager?.addSystemMessageListener(systemMessageListener)
        } else {
            Logger.d(CALL_TAG, TAG, "initSession() currentSession is null ")
        }
    }
private fun initAudioManager() { 
        if (audioManager == null) { 
            audioManager = AppRTCAudioManager.create(this)
            audioManager?.apply {
                defaultAudioDevice = AppRTCAudioManager.AudioDevice.SPEAKER_PHONE
                setOnWiredHeadsetStateListener { plugged, hasMicrophone ->
                    Logger.d(CALL_TAG, TAG, "plugged= $plugged, hasMicrophone= $hasMicrophone")
                }
                setBluetoothAudioDeviceStateListener { connected ->
                    Logger.d(CALL_TAG, TAG, "connected= $connected")
                }
            }
        }
    }
CubeRomanMagellan commented 3 years ago

Hello, looks like this is known Samsung issue

TatankaConCube commented 3 years ago

No activity for a long time. Closing...