Skip to content

Android 5.0 Lollipop wss stopped working #293

Closed
@szczepaan

Description

@szczepaan

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions