Android examples for Network:HTTPS SSL
get Hostname Verifier for SSL
//package com.java2s; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; public class Main { private static HostnameVerifier hostnameVerifier; private static HostnameVerifier getHostnameVerifier() { if (hostnameVerifier == null) { hostnameVerifier = new HostnameVerifier() { @Override/*from w w w. j av a2 s . c o m*/ public boolean verify(String s, SSLSession sslSession) { return true; } }; } return hostnameVerifier; } }