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
CertificatePinner certificatePinner = new CertificatePinner.Builder() | |
.add("publicobject.com", "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=") | |
.add("bikewise.org", "sha256/x9SZw6TwIqfmvrLZ/kz1o0Ossjmn728BnBKpUFqGNVM=") | |
.build(); | |
OkHttpClient client = OkHttpClient.Builder() | |
.certificatePinner(certificatePinner) | |
.build(); |
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
/** | |
* Logs if HttpsURLConnection.setHostnameVerifier() is working or not. | |
* Also returns boolean to that effect. | |
*/ | |
static boolean testHostnameVerifier() { | |
boolean isWorking = false; | |
HttpsURLConnection connection = null; | |
try { | |
URL aUrl = new URL("https://firebase.google.com"); | |
// Get our HTTPS connection object |
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
apply plugin: 'com.android.application' | |
apply plugin: 'com.google.firebase.firebase-perf' | |
dependencies { | |
compile 'com.google.firebase:firebase-perf:10.2.6' | |
} | |