I am create application with QuickBlox http://quickblox.com/developers/Sample-webrtc-android , and in some case i can`t reales camera object after using Video chat on android device, while i am explore this problem i am see that this problec fire when i am accept or start calling to another phone. If in this moment i am put on Hang up button and run this code:
if (getCurrentSession() != null && getCurrentSession().getState().equals(QBRTCSession.QBRTCSessionState.QB_RTC_SESSION_ACTIVE)) {
getCurrentSession().hangUp(new HashMap<String, String>());
}
and after onSessionClosed i am close current fragment and open another where i have succesfull before working camera, and have a problem ** java.lang.RuntimeException: Fail to connect to camera service** only force close the app helps me to reopen new camera instans and secesfully run camera on my device. Can someone helps how to proper close the camera when using video stream on Android device