Announcement Announcement Module
Collapse
No announcement yet.
Recommend HttpResponseCache library? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recommend HttpResponseCache library?

    Google recommends that all new projects use HttpUrlConnection for Http(s) communication: http://android-developers.blogspot.c...p-clients.html - at least, unless you're targeting Froyo and earlier, then things get murky. I see that Spring Android, after the M4 release, started detecting the version of Android and choosing to use HttpClient or HttpUrlConnection as appropriate to avoid that problem.

    I notice that the bug tracker also has a few issues about disable connection reuse on certain versions of Android, problems with inefficient gzip, etc

    I noticed these problems, so I decided to separate out the HttpUrlConnection support from AOSP's ICS release and make it into a library (which is already in Maven Central, BTW). If you use this library, you not only get caching (which was my primary original intent), but also the entire ICS HttpUrlConnection stack, including transparent gzip, functional connection pooling/reuse, etc regardless of what version of Android is being run.

    Jesse Wilson, developer on the Android/Dalvik project, helped me with this project and recommends it: https://plus.google.com/106557483623...ts/8yMMcvJgSwJ

    I think using this library would eliminate a lot of problems, reduce the number of areas Spring Android has to concern itself with, and provide a better developer experience. You could say something like, "if you're targeting Android before ICS, include and use the library, otherwise, you can, but don't have to do so."

  • #2
    Hi, thanks for the information about breaking out the ICS stack into its own library. That's very interesting, and I'll look at including it in Spring Android. I'm nearing an RC1 release right now, and beyond testing on ICS, I haven't spent any time addressing any new ICS features. This is largely because there is very little adoption of ICS at the moment. Spring Android 1.0 will be released with Froyo (2.1) support, but the Froyo usage rate is dropping, so I can see us moving forward to a 2.2 minimum in the near future. At this point, since there has been a bit of a gap from the M4 release, I'm not scheduling any new features for 1.0. I'll plan on looking at incorporating support for this library in the next release iteration.

    Comment

    Working...
    X