Closed
Description
Hey,
below code worked for Android 4.x.x (also Kitkat), and stopped working on Lollipop
SSLContext sslContext = null; try { sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, null, null); // will use java's default key and trust store which is sufficient unless you deal with self-signed certificates } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (KeyManagementException e) { e.printStackTrace(); } mWebSocketClient.setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext)); mWebSocketClient.connect();
I dont get any error, it just doesnt connect to wss server, onOpen() is never called :/
Please help