Closed digitalmidges closed 1 year ago
@digitalmidges the issue is really strange and the logic of your application is unclear for me. Please provide some logs (with this error) to give us an understanding of your application flow, and we will try to help you.
@alexparvus1 when two users are in a video call or an audio call, I'm starting a foreground service to handle the call elapsed time and etc... the service also responsible for the events from Quickblox
I'm getting a weird bug in this scenario: User A is calling User B -> User B answer the call and the two start talking -> after a while User A ( who made the call ) decided to exit the app from recent task (recent task - swipe to exit) -> from the foreground service, onTaskRemoved called
And this is the bug, I can't disconnect from the call in the scenario The call never hang up unless User B hang up...
This is the crash log:
Attempt to invoke interface method 'boolean com.quickblox.chat.connections.ChatConnectionExtensionAble.isSupportStreamManagement()' on a null object reference
Any Idea what I should do?
You just need to handle calls in another service or make your service responsible for displaying a notification with call details. And if your application has been closed by the user - you should launch them when the user presses on a notification or launch the application by pressing the application icon. Look how I made this flow in the videochat sample: https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-videochat-java
@digitalmidges Hello
This is Nikolay from QuickBlox support.
Please let me know if you had a chance to check the previous reply and try the provided solution.
When I'm during a Video or an Audio call, and the user who made the call "kill" the app from the task manager. Im getting a weird bug.
In my Service which handle the QB communication I'm override 'onTaskRemoved'
override fun onTaskRemoved(rootIntent: Intent?) { super.onTaskRemoved(rootIntent) if (QuickbloxManager.isLoginToQuickBlox()) { // in order to use quickblox video we must log in to chat first doAfterSuccessQuickbloxLogin() } else { QuickbloxManager.doLoginFlow() } }
notice that for some reason I'm not logged in to the chat service.. After trying to login ignorer to hangup the call Im getting this error:
Attempt to invoke interface method 'boolean com.quickblox.chat.connections.ChatConnectionExtensionAble.isSupportStreamManagement()' on a null object reference
What can I do? I must handle the situation that a user can exit the video call from recent task.. Any idea?
If the User that answer the call (Not the one who made the call) do the same thing - its working fine...
This is some of my code:
// Chat init { val configurationBuilder = QBTcpConfigurationBuilder() configurationBuilder.socketTimeout = 300 QBSettings.getInstance().logLevel = LogLevel.DEBUG QBChatService.setDebugEnabled(BuildConfig.DEBUG) QBChatService.setConfigurationBuilder(buildChatConfigs()) QBChatService.setDefaultPacketReplyTimeout(15*1000) qbChatService.setUseStreamManagement(true) }
// Video private fun configureQuickblox() { QBRTCConfig.setDebugEnabled(BuildConfig.DEBUG) QBRTCConfig.setAnswerTimeInterval(60) QBRTCConfig.setDisconnectTime(10) QBRTCConfig.setDialingTimeInterval(5) QBRTCConfig.setMaxOpponentsCount(2) QBRTCConfig.setDebugEnabled(true) QBRTCMediaConfig.setAudioCodec(QBRTCMediaConfig.AudioCodec.ISAC) QBRTCMediaConfig.setVideoCodec(QBRTCMediaConfig.VideoCodec.H264) // AcousticEchoCanceler QBRTCMediaConfig.setUseBuildInAEC(true) // Enable OpenSL ES audio if device supports it QBRTCMediaConfig.setUseOpenSLES(false) QBRTCMediaConfig.setAudioProcessingEnabled(true) // Enable Hardware Acceleration if device supports it QBRTCMediaConfig.setVideoHWAcceleration(true) QBRTCMediaConfig.setVideoWidth(QBRTCMediaConfig.VideoQuality.VGA_VIDEO.width) QBRTCMediaConfig.setVideoHeight(QBRTCMediaConfig.VideoQuality.VGA_VIDEO.height) }