Giter VIP home page Giter VIP logo

Comments (9)

kirillTolmachev avatar kirillTolmachev commented on July 28, 2024 1

Hello @Yaya-Dev-Box
We have released a server patch to our shared server.
If you have a dedicated instance please contact with our support team for updating.

from quickblox-android-sdk.

kirillTolmachev avatar kirillTolmachev commented on July 28, 2024

Hello @Yaya-Dev-Box
Now we are working to resolve the issue and give you an answer. Please wait for a new release Android SDK.

from quickblox-android-sdk.

Yaya-Dev-Box avatar Yaya-Dev-Box commented on July 28, 2024

@kirillTolmachev That's great, thanks.

I will be waiting.

from quickblox-android-sdk.

kirillTolmachev avatar kirillTolmachev commented on July 28, 2024

@Yaya-Dev-Box
The Android SDK side was fixed but we need to do some improvements in our chat server.
Now you can update your Android SDK to version 4.0.1 and wait for an update from the chat server side.

from quickblox-android-sdk.

Yaya-Dev-Box avatar Yaya-Dev-Box commented on July 28, 2024

@kirillTolmachev That's great, thank you.

from quickblox-android-sdk.

Yaya-Dev-Box avatar Yaya-Dev-Box commented on July 28, 2024

Hi @kirillTolmachev, thanks for the update.

Are there any steps I need to make in order for the new change to take effect?
I have already updated the SDK to use version "4.0.3", and also enabled "carbons" inside the sample-videochat-kotlin

Are there any other steps I'm missing? also, in what manner will the SDK be relaying user hangups/accepts with this new change?

from quickblox-android-sdk.

vdovbnya-qb avatar vdovbnya-qb commented on July 28, 2024

Hi @Yaya-Dev-Box

For correct work logic of multi-devices, you need to add logic with enable carbon.
Inside the sample-videochat-kotlin in LoginService need to update method fun loginToChat(qbUser: QBUser).
Before login to chat add ConnectionListener

private fun loginToChat(qbUser: QBUser) {
    QBChatService.getInstance().addConnectionListener(object : AbstractConnectionListener() {
        override fun authenticated(connection: XMPPConnection, resumed: Boolean) {
            try {
                CarbonManager.getInstanceFor(connection).sendCarbonsEnabled(true)
            } catch (e: NotConnectedException) {
                    // handle error
            }
        }
    })
    
    chatService.login(qbUser, object : QBEntityCallback<QBUser> {
        override fun onSuccess(qbUser: QBUser?, bundle: Bundle) {
            Log.d(TAG, "login onSuccess")
            startActionsOnSuccessLogin()
        }
        override fun onError(e: QBResponseException) {
            Log.d(TAG, "login onError " + e.message)
            val errorMessage = if (e.message != null) {
                e.message
            } else {
                "Login error"
            }
            sendResultToActivity(false, errorMessage)
        }
    })
}

For correct work, the application needs to update several methods fun onCallAcceptByUser() and fun onCallRejectByUser() in CallActivity.

private fun checkAndFinishMultiDeviceCall(userId: Int?) {
        // here we check that call was accepted or rejected from another device
        val currentUserId = QBChatService.getInstance().user.id
        if (currentUserId == userId) {
            WebRtcSessionManager.setCurrentSession(null)
            callService.stopForeground(true)
            finish()
     }
}
override fun onCallAcceptByUser(session: QBRTCSession?, userId: Int?, map: MutableMap<String, String>?) {
    if (callService.isCurrentSession(session)) {
        callService.stopRingtone()
    }
    
  checkAndFinishMultiDeviceCall(userId)
}
override fun onCallRejectByUser(session: QBRTCSession?, userId: Int?, map: MutableMap<String, String>?) {
    if (callService.isCurrentSession(session)) {
        callService.stopRingtone()
    }

    checkAndFinishMultiDeviceCall(userId)
}

from quickblox-android-sdk.

Yaya-Dev-Box avatar Yaya-Dev-Box commented on July 28, 2024

Works like a charm.

Thank you both @kirillTolmachev and @vdovbnya-qb , this issue is resolved now, feel free to close it.

from quickblox-android-sdk.

kirillTolmachev avatar kirillTolmachev commented on July 28, 2024

@Yaya-Dev-Box
Thank you for your feedback.
The issue is closed.

from quickblox-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.