Android examples for Network:HTTP
disable Connection Reuse If Necessary for HTTP connection
//package com.java2s; import android.os.Build; public class Main { private static void disableConnectionReuseIfNecessary() { // HTTP connection reuse which was buggy pre-froyo if (hasHttpConnectionBug()) { System.setProperty("http.keepAlive", "false"); }//from w w w.j a v a 2 s .c o m } private static boolean hasHttpConnectionBug() { return Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO; } }