Video calling returns runtime error for group call
Closed this issue · 1 comments
Hi,
I download the code from git and updated the dependencies, I'm getting this error.
Sdk:32
Android Studio: Bumblebee
Sample Code:
callSettings = new CallSettings.CallSettingsBuilder(this,mainView)
.setSessionId(sessionID)
.build();
CometChatError.init(this);
Log.e( "startCallActivity: ",sessionID+" "+type);
CometChat.startCall(callSettings, new CometChat.OngoingCallListener() {
@Override
public void onUserListUpdated(List<User> list) {
Log.e( "onUserListUpdated: ",list.toString() );
}
@Override
public void onAudioModesUpdated(List<AudioMode> list) {
Log.e("onAudioModesUpdated: ",list.toString() );
}
@Override
public void onRecordingStarted(User user) {
}
@Override
public void onRecordingStopped(User user) {
}
@Override
public void onUserMuted(User user, User user1) {
}
@Override
public void onCallSwitchedToVideo(String s, User user, User user1) {
Log.e("onUserJoined: ", user.getUid());
}
@Override
public void onUserJoined(User user) {
connectingLayout.setVisibility(View.GONE);
CometChatSnackBar.show(CometChatStartCallActivity.this,
mainView, getString(R.string.user_joined)+":"+ user.getName(),
CometChatSnackBar.INFO);
Log.e("onUserJoined: ", user.getUid());
}
@Override
public void onUserLeft(User user) {
if (user!=null) {
CometChatSnackBar.show(CometChatStartCallActivity.this,
mainView, getString(R.string.user_left)+":"+ user.getName(),
CometChatSnackBar.INFO);
Log.e("onUserLeft: ", user.getUid());
if (callSettings.getMode().equals(CallSettings.MODE_SINGLE)) {
endCall();
}
} else {
Log.e( "onUserLeft: ","triggered" );
}
}
@Override
public void onError(CometChatException e) {
stopService(mServiceIntent);
Log.e("onstartcallError: ", e.getMessage());
CometChatSnackBar.show(CometChatStartCallActivity.this,
mainView,CometChatError.localized(e), CometChatSnackBar.ERROR);
}
@Override
public void onCallEnded(Call call) {
stopService(mServiceIntent);
Log.e("TAG", "onCallEnded: ");
finish();
}
});
Error:
E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com.cometchat.pro.androiduikit, PID: 18642
java.lang.NoSuchMethodError: No virtual method showSwitchToVideoCallButton(Ljava/lang/Boolean;)Lcom/cometchat/pro/rtc/CometChatRTCView$CometChatRTCViewBuilder; in class Lcom/cometchat/pro/rtc/CometChatRTCView$CometChatRTCViewBuilder; or its super classes (declaration of 'com.cometchat.pro.rtc.CometChatRTCView$CometChatRTCViewBuilder' appears in /data/app/com.cometchat.pro.androiduikit-5cSpgSXnEmZWlLeRgrnjCg==/base.apk)
at com.cometchat.pro.core.CallManager.startCall(CallManager.java:95)
at com.cometchat.pro.core.CometChat$109.onResponse(CometChat.java:12)
at com.cometchat.pro.core.ApiConnection.handleApiResponse(ApiConnection.java:3)
at com.cometchat.pro.core.ApiConnection.access$000(ApiConnection.java:1)
at com.cometchat.pro.core.ApiConnection$3.onResponse(ApiConnection.java:2)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com.cometchat.pro.androiduikit, PID: 18642
java.lang.NoSuchMethodError: No virtual method showSwitchToVideoCallButton(Ljava/lang/Boolean;)Lcom/cometchat/pro/rtc/CometChatRTCView$CometChatRTCViewBuilder; in class Lcom/cometchat/pro/rtc/CometChatRTCView$CometChatRTCViewBuilder; or its super classes (declaration of 'com.cometchat.pro.rtc.CometChatRTCView$CometChatRTCViewBuilder' appears in /data/app/com.cometchat.pro.androiduikit-5cSpgSXnEmZWlLeRgrnjCg==/base.apk)
at com.cometchat.pro.core.CallManager.startCall(CallManager.java:95)
at com.cometchat.pro.core.CometChat$109.onResponse(CometChat.java:12)
at com.cometchat.pro.core.ApiConnection.handleApiResponse(ApiConnection.java:3)
at com.cometchat.pro.core.ApiConnection.access$000(ApiConnection.java:1)
at com.cometchat.pro.core.ApiConnection$3.onResponse(ApiConnection.java:2)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
This has been fixed. Please try v4.x