android javax.net.ssl.SSLException hostname in certificate didn’t match

In android when you are using http://loopj.com/android-async-http/ async libray . you can face android javax.net.ssl.SSLException hostname in certificate didn’t match exception you can ressolve this exception by replacing

AsyncHttpClient client = new AsyncHttpClient();

with

AsyncHttpClient client = new AsyncHttpClient(true,80,443);

Leave a Reply

Your email address will not be published. Required fields are marked *