title: io.socket.engineio.client.EngineIOException: xhr poll error for above lollipop devices
body: <p>I was trying to connect URL (<strong>wws://www.abc.com/ws?sid=sessionId0&amp;mobile=1</strong>) through WebSocket library <strong>socket.io</strong> in android. I am testing with android 5.1 phone. I got the following error as <strong>"io.socket.engineio.client.EngineIOException: xhr poll error"</strong>  </p>
  
  <p>Note: I studied that socket.io library is not supporting <strong>wws</strong> security connections from and above lollipop devices. </p>
  
  <pre><code> String url = "wws://www.abc.com/ws?sid=sessionId0&amp;mobile=1";
  
   mSocket = IO.socket(url);
   mSocket.on(Socket.EVENT_CONNECT, onConnect);
   mSocket.on(Socket.EVENT_DISCONNECT, onDisconnect);
   mSocket.on(Socket.EVENT_CONNECT_ERROR, onConnectError);
   mSocket.on(Socket.EVENT_CONNECT_TIMEOUT, onConnectError);
   mSocket.connect();
  
  
  
  
  private Emitter.Listener onConnect = new Emitter.Listener() {
          @Override
          public void call(Object... args) {
              Log.e(TAG, "socket is connected");
              if (!isConnected) {
                  if (null != mUsername)
                      mSocket.emit("add user", mUsername);
                  isConnected = true;
              }
          }
      };
  
      private Emitter.Listener onDisconnect = new Emitter.Listener() {
          @Override
          public void call(Object... args) {
  
              isConnected = false;
              Log.e(TAG, "SOCKET is disconnected");
          }
      };
  
  
      private Emitter.Listener onConnectError = new Emitter.Listener() {
          @Override
          public void call(Object... args) {
              Log.e(TAG, "error occurred while connecting to socket");
          }
      };
  </code></pre>
  
  <p>How can I solve my problem. Suggestions will be appreciated.
  Thanks in advance :)</p>