Google Play Security Alert - Your app is using an unsafe implementation of the HostnameVerifier
<p>Recently one of my app got a security alert from Google Play as below.</p>

<p>You app is using an unsafe implementation of the <a href="https://developer.android.com/reference/javax/net/ssl/HostnameVerifier.html" rel="noreferrer">HostnameVerifier</a>. And refer a link to <a href="https://support.google.com/faqs/answer/7188426" rel="noreferrer">Google Play Help Center</a> article for details regarding to fixing and deadline of vulnerability.  </p>

<p>Below is my code.</p>

<pre><code>HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier(){ 
    public boolean verify(String arg0, SSLSession arg1) {
        return true;
}}); 
</code></pre>

<p>Anyone can explain with example about, what changes should I do to fix this warning?</p>