2017-01-11 62 views
0

我想實現QuickBlox語音呼叫在我的應用程序,從指令從Prepare your application for Android AppFiles gradle_ImageQuickBlox currentSession總是空

錯誤消息的指令之後: 試圖調用虛擬方法無效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(); 

回答

2

在開始通話之前,您必須先登錄QBChatService.getInstance()。login()。所以,請檢查登錄到聊天。

+0

謝謝。它有助於 –