Hi everyone, I am on a project that needs to suppo...
# android
r
Hi everyone, I am on a project that needs to support Android 4.1 (API Level 16) and I am trying to check the content-type of a link:
Copy code
val connection: URLConnection = URL(imageUrl).openConnection()
println("headerFields: ${connection.headerFields}")
println("content-type: ${connection.contentType}")
However, these properties are always coming as
null
I found that android cannot connect and gives me this error:
<http://javax.net|javax.net>.ssl.SSLProtocolException: SSL handshake aborted
I’m also not able to use
ProviderInstaller.installIfNeeded(context)
so I’m a bit lost Anyone knows how to fix this? Thanks in advance