我正按照Prepare your application for Android的指示,在我的应用程序中尝试实现QuickBlox语音呼叫
错误消息: 尝试调用虚方法' void com.quickblox.videochat.webrtc.QBRTCSession.addSessionCallbacksListener(com.quickblox.videochat.webrtc.callbacks.QBRTCSessionConnectionCallbacks)'在空对象引用上
QBChatService.getInstance().getVideoChatWebRTCSignalingManager()
.addSignalingManagerListener(new QBVideoChatSignalingManagerListener() {
@Override
public void signalingCreated(QBSignaling qbSignaling, boolean createdLocally) {
if (!createdLocally) {
QBRTCClient.getInstance(getApplicationContext()).addSignaling((QBWebRTCSignaling) qbSignaling);
}
}
});
WebRtcSessionManager.getInstance(this).getCurrentSession().addSessionCallbacksListener(this);
WebRtcSessionManager.getInstance(this).getCurrentSession().addVideoTrackCallbacksListener(this);
QBRTCClient.getInstance(this).addSessionCallbacksListener(this);
QBRTCClient.getInstance(this).prepareToProcessCalls();
答案 0 :(得分:1)
在开始通话之前,您必须登录聊天QBChatService.getInstance()。login()。所以,请检查登录聊天。