if (e instanceof SSLPeerUnverifiedException)
By default, accessing an HTTPS URL using the URL class results in an exception if the server's certificate cannot be validated. (On emulator)
One need to disable certificate validation in an HTTPS Connection. To know how to disable certificate validation, follow this link
Mahavir