Recently one of my app got a security alert from Google Play as below.
You app is using an unsafe implementation of the HostnameVerifier. And refer a link to Google
Please check my code I have only verified domains that my app uses. In your code you must verify all domains your app uses. I have used my server and Fabric.com so my code is below
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession arg1) {
if (hostname.equalsIgnoreCase("api.my.com") ||
hostname.equalsIgnoreCase("api.crashlytics.com") ||
hostname.equalsIgnoreCase("settings.crashlytics.com")) {
return true;
} else {
return false;
}
}
});