Connection failed with result 5

0 votes
I wrote a small code to add a room for my app, throught the edit text and button. But on clicking the button the connection fails. what is the reason? I added my apikey and secret key as well.

Here's my init()

public void init() {
        WarpClient.initialize(Constants.app_key, Constants.app_secret);
        try {
            theClient = WarpClient.getInstance();
            WarpClient.enableTrace(true);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            Toast.makeText(this, "Exception in Initilization", Toast.LENGTH_LONG).show();
        }
        theClient.addConnectionRequestListener(this);
    }

and heres the button click listener

connected.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                props = new HashMap<String, Object>();
                props.put(interest.getText().toString(), 30);
                progressDialog = ProgressDialog.show(context,"","Please Wait..");
                progressDialog.setCancelable(true);
                theClient.connectWithUserName("Mr. V");
                theClient.createRoom(interest.getText().toString(), "Mr. V", 30, props);
            }
        });

and finally the onConnected over ride

public void onConnectDone(final ConnectEvent event) {
        // TODO Auto-generated method stub
        Log.d("OnConnectDone", ""+event.getResult());
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                if(progressDialog!=null){
                    progressDialog.dismiss();
                    progressDialog=null;
                }
                if(event.getResult()==WarpResponseResultCode.SUCCESS){
                    Toast.makeText(MainActivity.this, "Connection Success", Toast.LENGTH_SHORT).show();
                }else{
                    Toast.makeText(MainActivity.this, "Connection Failed "+event.getResult(), Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
asked Apr 27, 2014 in AppWarp by vish.sharma0203 (10 points)

1 Answer

0 votes
Please add a comment if your question is a follow up related to an existing question, instead of creating a new question.
answered Apr 27, 2014 by dhruvc (1,099 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...