I am developing an android application that rely very much on internet, I retrieve data frequently using this RestClient Class, that wrap some detail on using DefaultHttpCli
I suggest you take a look at the ClientConnectionManager
interface. This allows you to do stuff like releasing a connection, shutting down a connection etc. You may need to enhance the implementation of RestClient
though - since your RestClient
does not expose the underlying DefaultHttpClient
object (from which you can get to the ClientConnectionManager
using the getClientConnectionManager()
method).