Search code examples
androidquickblox

Quickblox Chat Application,Android


I am using Quickblox Api for building chat Application,successfully integrated in my app,but When I am Login to Chat Application for first Time my session token also generated,calls all relevant api,except this url POST https://api.quickblox.com/chat/Dialog.json?name=shailesh&type=3&occupants_ids=2142362, I am not getting response back only for first time but when I check isLoggedIn()i.e (For Second Time) the same url give me success.

Please help me, Thanks in Advance.


Solution

  • Are you sure you are passing the Jabber ID correctly?

    Checkout:http://quickblox.com/developers/SimpleSample-chat_users-ios#Connect_QuickBlox_to_your_application

    Remember:

    • standard login+password authentication: use same password
    • Facebook/Twitter authentication: use session token as password

    here's what quickblox says:

    QBUser user = new QBUser();
    user.setId(id);  //id is int
    try {
        user.setPassword(BaseService.getBaseService().getToken());
    }catch(BaseServiceException e) {
        e.printStackTrace();  
        // means you have not created a session before 
    }