I'm trying to create my first Android app and I have an issue.
I have web service with https protocol, to get the data from the server I use AsyncHttpClient
library,
it has been working with http, but once I've changed it to https it's gives me an error:
No peer certificate
I did some research online, I found some advice how to fix it but I was abel to make it works.
This are just some of the links I tried: link 1 link 2
My code to call a web service:
AsyncHttpClient client = new AsyncHttpClient();
client.get(QUERY_URL,
new JsonHttpResponseHandler() {
@Override
public void onSuccess(JSONObject jsonObject) {
Log.d("test", jsonObject.toString());
}
@Override
public void onFailure(int statusCode, Throwable throwable, JSONObject error) {
Log.e("test", "Error: " + statusCode + " " + throwable.getMessage());
}
});
Maybe there is some other library which you recommend for calling https async?