konklone / congress-android

Congress for Android, an app for tracking Congress.
https://play.google.com/store/apps/details?id=com.sunlightlabs.android.congress
Other
157 stars 42 forks source link

Switch to HttpURLConnection for Gingerbread and up #458

Closed konklone closed 13 years ago

konklone commented 13 years ago

This article is making some compelling points: http://android-developers.blogspot.com/2011/09/androids-http-clients.html

I think we could make the underlying fetch mechanism conditional on the platform version code and abstract it out into some utils functions.

Main benefits are gzip compression/uncompression, and local caching.

konklone commented 13 years ago

This depends on us setting cache headers on the server -- which, for the Real Time Congress API anyway, is a complicated endeavor, and not going to happen any time soon.

It also doesn't make sense for something as real time as the Twitter API, or the Google News API, or even the YouTube API. The best candidate would be the Sunlight Labs Congress API (legislators and committees), but even that wouldn't make any sense for zip code and lat/lng entries. I just don't think this is worth it.