Reputation: 357
Am using quickblox to build a chat app with the ability to call a user. Am listening for an incoming call with:
@Override
public void onReceiveNewSession(QBRTCSession qbrtcSession) {
Log.v(TAG, qbrtcSession.getCallerID() + " is calling " + qbrtcSession.getConferenceType().getValue());
}
In my chat activity and would like to send qbrtcSession object to my CallActivity(similar to quickblox sample) so it shows the incoming call and I can accept the call using the qbrtcSession from my ChatActivity. I have tried using Gson but was giving me StackOverflowException. Would very much appreciate a way to do this or a better alternative to receive and accept calls using quickblox.
Link to QBRTCSession class: https://sdk.quickblox.com/android/com/quickblox/videochat/webrtc/QBRTCSession.html
Upvotes: 0
Views: 93
Reputation: 4179
Use a singleton instance in your application. Have a static variable of type QBRTCSession which you can use everywhere.
Upvotes: 0