Code example for Scheme

0
KeyManager keyManager = KeyChainKeyManager.fromAlias(context, clientCertAlias);
            SSLCertificateSocketFactory underlying = SSLUtils.getSSLSocketFactory(
                    trustAllServerCerts);
            underlying.setKeyManagers(new KeyManager[] { keyManager });
            registry.register(new Scheme(schemeName, new SSLSocketFactory(underlying), 443));
        } 
    } 
 
    /** 
     * Unregisters a custom connection type that uses a client certificate on the connection 
     * manager. 
     * @see #registerClientCert(Context, String, boolean) 
     */ 
    public synchronized void unregisterClientCert( 
            String clientCertAlias, boolean trustAllServerCerts) {
        SchemeRegistry registry = getSchemeRegistry();
        String schemeName = makeSchemeForClientCert(clientCertAlias, trustAllServerCerts);
        Scheme existing = registry.get(schemeName);
        if (existing != null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE