-
-
Save adamsp/2c32ddd9d3cec1985c6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
try { | |
OkHttpClient okHttpClient = new OkHttpClient(); | |
URL.setURLStreamHandlerFactory(okHttpClient); | |
} catch (Error e) { | |
// "When errors are thrown, they should not be caught by application code." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment