Menu

#334 Unable to set SSLSocketFactory for HttpsURLConnection

open
nobody
None
2019-10-16
2019-10-16
Anonymous
No

Originally created by: TSampley

For android API 19, TLS 1.1 and 1.2 are supported but not enabled by default.
The solution is to create an SSLSocketFactory and pass it to the HttpsURLConnection with setSSLSocketFactory. You can find an implementation of SSLSocketFactory here: https://gist.github.com/fkrauthan/ac8624466a4dee4fd02f

There is currently no way to override the SSLSocketFactory as far as I can see. I unfortunately have to drop use of Twitter4j because we need support for API 19 devices.

Discussion


Log in to post a comment.