Hi I already asked this questions, but this time I check that method to allow all certificate is not causing issue.
I develop an app which is also on iPhone. Problem is with api requests. I setup the timeouts for all requests. Sometimes it occurs kind a breaks from 30 - 60 second. It looks like this that app does couple request and than break, all the time timeouts, after about 45 second everything ok.
I don't know if this is server issue or android.
This problem doesn't occur on iPhone with IOS 5, but also apear on IOS 4.
I check for HttpClient and also fot HttpsURLConnection.
Connection is https, also was trying directly IP address.
All request has the same problem, all request are in async tasks.
All them looks the same:
DefaultHttpClient client = new HttpSupport().getNewHttpClient();
client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(user, pass));
HttpGet httget = new HttpGet("xxxxxxxxxxxxxxxxxxxxxxx");
httget.setHeader("Accept", "application/json");
HttpResponse respond = null;
try
{
respond = client.execute(httget);
}
catch (ClientProtocolException e)
{
Log.e(TAG,"getEvents, ClientProtocolException");
}
catch (IOException e)
{
Log.e(TAG,"getEvents, IOException: " + e.getMessage());
}
The code dor my HttpSupport class is in my prev question : Android - API Requests
It is can be the server fault? Thank you for any help.
Recently I notice that app is hang on client.execute... try to do like this: android httpclient hangs on second request to the server (connection timed out) , but is won't help. Maybe is not a api fault, but Android as it is. This app is pointing the api really often, but for the most of request everything is alright.
Still can't get rid off the 30-45 seconds of hangs up.
Today I tested again the app and I noticed that error occur only on wi-fi connection on Samsung Tablet with 3.2. On Wildfire with 2.3.7 (wi-fi and 3g) everything seems to be alright. I'm not telling that problem doesn't occur on mobile, but while I was testing I have not noticed timeouts.