I released Ion nearly a month ago, and completely forgot to blog about it. Whoops.

Ion is a general purpose networking library. Whether it is JSON, Strings, Files, Images (into ImageViews), etc; Ion can handle it.

There were a few high level goals that I wanted to accomplish:

  • Thread management should be transparent. Automatic invocation back onto the UI thread.
  • Intuitive and flexible API.
  • Automatic http caching.
  • Activity and Service lifecycle aware. No more checking isDestroyed.
  • All operations should return Futures (which are Cancelable).

The Ion Github page has a ton of samples that are worth checking out, but here's a quick overview of the API. Suppose you want to download a http resource as a String:

Want to download JSON? Easy, just change the "asString" to "asJsonObject".

Posting JSON is also easy:

Putting an image into an ImageView follows the same mechanics.

The image API also supports ListView recycling, caching, etc. Ion is a successor to UrlImageViewHelper.

Ion's fluent API is meant to be intuitive, and easily extensible. As I mentioned, Ion offers a ton of flexibility and features. Check out the README on the Github page for more samples, as this post barely scratches the surface of what is possible. If you find a feature is missing, let me know, and I'll add it.

ION - Android Networking Made Easy<p>I released <a href="https://plus.google.com/103583939320326217147/posts/64ciSdeFaB5">Ion</a> nearly a month ago,</p><p><a href="/post/ion" title="Read more of ION - Android Networking Made Easy">read more</a></p>

If you do any Android development on Windows, this will be ridiculously handy. Every manufacturer ships their own ADB driver on Windows, so getting new devices running on ADB is a royal pain. I've compiled a list of most phone vendor and product ids and rolled them into a single driver.

You can grab the download here. And the source is available on Github.

Universal Windows ADB Driver<p>If you do any Android development on Windows, this will be ridiculously handy. Every manufacturer</p><p><a href="/post/universal-adb-driver" title="Read more of Universal Windows ADB Driver">read more</a></p>

If you haven't used AndroidAsync yet, you should. It's a powerful NIO based socket and HTTP library for Android. Super fast, easy to use, and asynchronous.

The initial implementation was entirely callback based. So, you'd do something like, this:

I got a few request for Futures, which are also a nice pattern. So I added that transparently by making all the asynchronous calls return a Future instead of void.

So, now:

Futures can also have callbacks...

For brevity...


Futures in AndroidAsync<p>If you haven't used <a href="http://koush.com/AndroidAsync">AndroidAsync</a> yet, you should. It's a powerful <a href="http://en.wikipedia.org/wiki/New_I/O">NIO</a> based</p><p><a href="/post/android-async-futures" title="Read more of Futures in AndroidAsync">read more</a></p>