I use AndroidHttpClient for my server connections.
I created a singleton class that creates a single AndroidHttpClient instance and use it for all the connections. The client uses ThreadSafeClientConnManager and from my experience it works well.
Recently I noticed that I get an IllegalStateException("AndroidHttpClient created and never closed").
My question is - What is the best way to use AndroidHttpClient? Should I use a single AndroidHttpClient instance or create a new one for every connection I make and when should I close it?