title: unsafe implementation of the HostnameVerifier interface
body: <p>I developed the app and published the google play store then received the notification from Google
  <a href="https://i.stack.imgur.com/MAvFS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MAvFS.png" alt="enter image description here"></a></p>
  
  <p>HostnameVerifier
  Your app(s) are using an unsafe implementation of the HostnameVerifier interface. You can find more information about how to resolve the issue in this Google Help Center article, including the deadline for fixing the vulnerability.</p>
  
  <p>I can't use HostnameVerifier or call <code>setDefaultHostnameVerifier()</code>, I assume it relies upon some 3rd party lib. Third parties lib used- <code>Google map, baidu map, firebase crash analytics, firebase phone authentication, quick blox, mob authentication</code>. </p>
  
  <p>I tried to use these code in splash to solve this issue-</p>
  
  <pre><code>HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;
  
          DefaultHttpClient client = new DefaultHttpClient();
  
          SchemeRegistry registry = new SchemeRegistry();
          SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();
          socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);
          registry.register(new Scheme("https", socketFactory, 443));
          SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);
          DefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());
          HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);
  </code></pre>
  
  <p>And </p>
  
  <pre><code>HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
              public boolean verify(final String hostname, final SSLSession session) {
  
  
  
                  if (session.isValid()) {
  
                      return true;
                  }
                  else
                  {
                      return false;
                  }`
  </code></pre>
  
  <p>But, my app got rejected from Google play store.</p>
  
  <p>Please, help me in finding whats wrong with this code? and how to solve it?</p>