I am using quickblox sdk 2.4 for video chat service.I used the following steps to point my android application to a new instance
//before logging into application i am setting the following instances QBSettings.getInstance().setServerApiDomain("apixyzquickblox.com"); QBSettings.getInstance().setContentBucketName("..."); QBSettings.getInstance().setChatServerDomain("chatxyz.quickblox.com"); QBSettings.getInstance().setTurnServerDomain("turn.quickblox.com"); //had used appid, authkey and authsecret from an existing quickblox account QBSettings.getInstance().fastConfigInit(Consts.APP_ID, Consts.AUTH_KEY, Consts.AUTH_SECRET); // to set enterprise sdk they asked me to use the following code as it is List iceServerList = new LinkedList<>();
iceServerList.add(new PeerConnection.IceServer("stun:stun.l.google.com:19302",
null, null));
iceServerList.add(new PeerConnection.IceServer("stun:turn.quickblox.com",
"quickblox", "baccb97ba2d92d71e26eb9886da5f1e0"));
iceServerList.add(new PeerConnection.IceServer("turn:turn.quickblox.com:3478?transport=udp",
"quickblox", "baccb97ba2d92d71e26eb9886da5f1e0"));
iceServerList.add(new PeerConnection.IceServer("turn:turn.quickblox.com:3478?transport=tcp",
"quickblox", "baccb97ba2d92d71e26eb9886da5f1e0"));
QBRTCConfig.setIceServerList(iceServerList);
Now i logged in to this application on button click btnNext.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
QBAuth.createSession(new QBEntityCallbackImpl<QBSession>() {
@Override
public void onSuccess(QBSession qbSession, Bundle bundle) {
// **this user exists in quickblox admin panel **
QBUser qbUser = new QBUser("abc1", "abc1234");
QBUsers.signIn(qbUser, new QBEntityCallbackImpl<QBUser>() {
@Override
public void onSuccess(QBUser qbUser, Bundle bundle) {
Toast.makeText(getApplicationContext(), "Login Success", Toast.LENGTH_SHORT).show();
}
@Override
public void onError(List<String> errors) {
}
});
}
@Override
public void onError(List<String> errors) {
// print errors that came from server
}
});
});
when i click on next button i get response as Status=422 Unprocessable Entity When i use the same user id in shared instance it works perfect. but as soon as i change to trial instances in enterprise i face this problem
Please help me fix this. Thanks in Advance
The very first thing i want to inform you is that the documentation for quickblox that they sent me while setting the trail instance is old And I used the same Consts.APP_ID, Consts.AUTH_KEY, Consts.AUTH_SECRET that was mentioned in my quickblox account. and I configured the code this way and it worked for me.
QBSettings.getInstance().fastConfigInit(Consts.APP_ID, Consts.AUTH_KEY, Consts.AUTH_SECRET); QBSettings.getInstance().setServerApiDomain("apixyzquickblox.com"); QBSettings.getInstance().setContentBucketName("..."); QBSettings.getInstance().setChatServerDomain("chatxyz.quickblox.com"); QBSettings.getInstance().setTurnServerDomain("turnserver.quickblox.com");
And also there is no need to set ice servers until you have set your own custom servers