Code example for SingleClientConnManager

0
                SchemeRegistry schemeRegistry = new SchemeRegistry();
                schemeRegistry.register(new Scheme("http",
                  PlainSocketFactory.getSocketFactory(), 80));
 
                SingleClientConnManager cm =
                  new SingleClientConnManager(params, schemeRegistry);
 
                return new DefaultHttpClient(cm, params);
        } 
 
        public void run() 
        { 
                Log.d(TAG, "Connecting...");
 
                HttpClient cli = getClient();
                HttpGet method;
                 
                method = new HttpGet(mDownload.url.toString());
                 
                /* It's important that we pause here to check if we've been stopped 
                 * already.  Otherwise, we would happily progress, seemingly ignoring