Quickblox callback when a participant leaves or stops a call

I am working on a video chat application using QuickBlox. Here is the situation where I am making a call from device-A to device-B and if the activity on device-A just pauses or the application gets a closed thread on device-B stop (offcourse). o when I try to call again from device-A, I need to restart the app on device-B, then it selects the call, otherwise the call on device-B will not be accepted and QBVideoStreamView

just show the image on which it will hang.

So which callback should be called when the participant has stopped the call, there is actually a onStop()

CallBack method , but it gets called after such a long time or so that it will never be called.

So my question is, how can I get a callback if the participant stops the call or the participant leaves? Or some better disposal method to prepare for your next call?

In fact, I want the text to be smoother if the call is disconnected or stopped. I can easily call back without rebooting.

Edit: Crash on calling When I recall I got this multiple times

01-08 11:40:14.708: E/WEBRTC-JC(4465): startCapture failed
01-08 11:40:14.708: E/WEBRTC-JC(4465): java.lang.RuntimeException: Fail to connect to camera service
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.hardware.Camera.native_setup(Native Method)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.hardware.Camera.<init>(Camera.java:351)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.hardware.Camera.open(Camera.java:310)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at org.webrtc.videoengine.VideoCaptureAndroid.startCaptureOnCameraThread(VideoCaptureAndroid.java:145)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at org.webrtc.videoengine.VideoCaptureAndroid.access$400(VideoCaptureAndroid.java:40)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at org.webrtc.videoengine.VideoCaptureAndroid$2.run(VideoCaptureAndroid.java:132)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.os.Handler.handleCallback(Handler.java:733)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.os.Handler.dispatchMessage(Handler.java:95)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at android.os.Looper.loop(Looper.java:136)
01-08 11:40:14.708: E/WEBRTC-JC(4465):  at org.webrtc.videoengine.VideoCaptureAndroid$CameraThread.run(VideoCaptureAndroid.java:107)
01-08 11:40:14.708: E/libjingle(4465): Error(webrtcvideocapturer.cc:274): Camera 'Camera 1, Facing front, Orientation 270' failed to start
01-08 11:40:14.708: E/libjingle(4465): Error(common.cc:76): ../../talk/app/webrtc/videosource.cc(458): ASSERT FAILED: state_ != new_state @ SetState

      

0


source to share


1 answer


When your call is canceled ... before calling again, you can call

QBVideoChatController.getInstance().finishVideoChat(videoChatConfig);   

      



which makes sure your call ends and the rest can start as a normal call. If in your case there is no need to check the active call

0


source







All Articles