Created
October 4, 2016 18:44
-
-
Save truedem/bca0787ffafa6f34eb99fe098e6ed75b to your computer and use it in GitHub Desktop.
Installation of TLS 1.2 on Android 4.* devices
This file contains hidden or 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
try { | |
SSLContext.getInstance("TLSv1.2"); | |
ProviderInstaller.installIfNeeded(this); | |
} catch (GooglePlayServicesRepairableException e) { | |
// Thrown when Google Play Services is not installed, up-to-date, or enabled | |
// Show dialog to allow users to install, update, or otherwise enable Google Play services. | |
GooglePlayServicesUtil.getErrorDialog(e.getConnectionStatusCode(), (Activity) context, 0); | |
} catch (GooglePlayServicesNotAvailableException e) { | |
Log.e("SecurityException", "Google Play Services not available."); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation from Google services.