Hi all,
i try to build an https client for android and i need do get some request of an Servlet but when i use the getInputStream method the applicaion hangs.
There is no error only hanging when i call the method.
String url = "https://.../Servlet";
try {
mPushLiteConnection = (HttpsURLConnection) new URL(url).openConnection();
mPushLiteConnection.setDoOutput(true);
mPushLiteConnection.setDoInput(true);
mPushLiteConnection.setRequestMethod("POST");
mPushLiteConnection.connect();
subscribe();
InputStream in = (InputStream)mPushLiteConnection.getInputStream();
unsubscribe();
mPushLiteConnection.disconnect();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this is only to check the call, but it didtn work. Any idea why it hangs and tell me nothing?
the subscribe method works, when i comment out the line with the inputstream, the server show me all is correct. I can try the same with the Firefox and it works and i can see the request.
i also put the keystore into the TrustManager.
sorry for my english i hope i explain it ennougth.
THX