In some situations, we noticed that our users had followed correctly our guide regarding installing the SDK to Android, whereas, we checked that some devices aren't creating the new installation.
We found out that on some of these devices, you need to force TLS v1.2 for Android 4.0+ because they aren't enabling this by default. You should paste the code below in the first line of your Android Application project.
try {
ProviderInstaller.installIfNeeded(getApplicationContext());
SSLContext sslContext;
sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
sslContext.createSSLEngine();
} catch (GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException
| NoSuchAlgorithmException | KeyManagementException e) {
e.printStackTrace();
}
Read more details about this on GitHub: GitHub - TLS v1.2 for Android 4.0 devices
I hope you've enjoyed this article and if you have any feedback, please, don't hesitate to reach us on our website or email us, we'll be glad to hear from you!
Comments
0 comments
Please sign in to leave a comment.