in my app i try to get access to some web service. I'm going through form based authentication and getting an authorized connection. If i passed authorization i want open new Activity, but any new instance of DefaultHttpClient got unauthorized right.
And questions is:
1) How pass this connection through activity
2) Or how keep connection authorized correctly, if i think about httpclient interceptor, I'm on the right way? If, yes, then first question remain, but relativity of pass CookieStore data.
You should almost always make a class that handles your Http Requests call is ConnectionManager thats the most common name. And you should make it with Singleton Design Pattern. This way your connections will be handled correctly.
When you need to use the ConnectionManager use this:
Subclass the Application. You'll need to list it in the manifest so that it is created. You'll be able to retrieve it from within any activity.
elsewhere