Foxykeep
Foxykeep

Reputation: 218

Weird min API level for AndroidHttpClient

I was messing with my DataDroid library and the new lint check revealed a weird bug in the Android SDK.

For those who don't know DataDroid, it's a library for local and remote data management (more info available here : http://datadroid.foxykeep.com)

To call webservices in the library, I use the class AndroidHttpClient to make the connection to the server in my NetworkConnection class. My library is available for Android 1.6 and higher version and I never had any problem with it even on 1.6 phones.

What's weird is that in the SDK documentation, we can see that AndroidHttpClient is available only for API 2.2 and higher. I discovered that via the new lint check "NewApi" which showed an error saying that the minSdkVersion was not high enough.

I looked at the source code of Android and I found out that this class existed already in 1.6 and was not private. So I think there is a bug in the min API level of this class in the documentation... it should be 4 (maybe lower but I didn't check)

The only problem is I don't know where this information is stored, so I can't create a patch to fix it...

Upvotes: 2

Views: 259

Answers (1)

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52936

The class has been there for a while, but since it was not public, certain builds may exclude it and your program might fail on those. This is not a bug, there are other classes that are not hidden, but for one reason or another have not been made public (yet).

Upvotes: 3

Related Questions