4

How can I find out what version of HTTPclient is in Android 2.2 ? I think it's important information to have but I didn't see anything in Google's API documentation http://developer.android.com/reference/org/apache/http/client/package-summary.html

Also, after I download Apache's HTTPclient 4.1.3 (or the 4.2 dev beta) how do I make sure my app uses the API calls from the downloaded Apache library instead of Android's built-in HTTPclient API's ?

I think the last time I tried it I got a lot of warnings when my app started up about duplicate API's

Thanks !!

2
  • Check this class developer.android.com/reference/org/apache/http/util/… Commented Feb 6, 2012 at 20:52
  • 1
    Unfortunately, the following code returns an empty versionInfo array on 2.2 using the emulator final VersionInfo[] httpVersion = VersionInfo.loadVersionInfo(new String[] {"org.apache.http","org.apache.http.client"}, null); Commented Feb 6, 2012 at 23:31

2 Answers 2

0

As per this official android link , android team supports HttpURLConnection more with compare to DefaultHttpClient of apache ... http://android-developers.blogspot.in/2011/09/androids-http-clients.html

Sign up to request clarification or add additional context in comments.

Comments

0

Iam also using Android 2.2 SDK. I downloaded most current Apache HTTPclient (httpclient-4.2.1, httpcore-4.2.1, httpmime-4.2.1, apache-mime4j-core-0.7.2) and added the libs to Build path. Then I was able to verify the version being in use by:

Code:

VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.http.client",getClass().getClassLoader()); String version = vi.getRelease(); Log.d("apache http client version", version); 

Output:

apache http client version 4.2.1 

1 Comment

Doesn't this just return the version of the client you downloaded & bundled, as opposed to the OS supplied version?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.