@SuppressLint("PrivateApi")
    private String getOpenSSLEngineImplAlpn() throws ClassNotFoundException, NoSuchMethodException,
            NoSuchFieldException, IllegalAccessException, InvocationTargetException {
        Class<?> nativeCryptoClass = Class.forName("com.android.org.conscrypt.NativeCrypto");
        Method SSL_get0_alpn_selectedMethod = nativeCryptoClass.getDeclaredMethod(
                "SSL_get0_alpn_selected", long.class);
        SSL_get0_alpn_selectedMethod.setAccessible(true);

        Field sslNativePointerField = mSSLEngine.getClass().getDeclaredField("sslNativePointer");
        sslNativePointerField.setAccessible(true);
        long sslNativePointer = (long) sslNativePointerField.get(mSSLEngine);
        byte[] selectedProtocol = (byte[]) SSL_get0_alpn_selectedMethod.invoke(null, sslNativePointer);
        return selectedProtocol != null ? new String(selectedProtocol, Charset.forName("UTF-8")) : null;
    }
Http SSL codec enables Application-Layer Protocol Negotiation(ALPN).

See http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04#page-4

@author Megatron King
@since 2019/1/3 23:31
netbare-core/src/main/java/com/github/megatronking/netbare/http/HttpSSLResponseCodec.java