E.g. there are 10MB data stored in my tablet. The data has a list structure. Each entry in the list is about 3500 Bytes.
Currently, I send one entry each time with the following codes:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(ipport+ phpHandler);
HttpResponse response = null;
try {
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "utf-8"));
response = httpclient.execute(httppost);
} catch (UnsupportedEncodingException e) {
} catch (ClientProtocolException e) {
} catch (IOException e) {
}
But to send this 10MB data, it took a long time. Each sending of an entry takes about 1 second.
Any solution to improve the efficiency?