loquacious_logoI’m oh-so-happy to announce that Loquacious, an awesome Twitter client for Android devices, is now available in the Android Market. Check out the web page for more details and screenshots.

Loquacious is all about a great reading experience. It has a big, clean list of tweets to read. It’s not cluttered up with buttons, text fields, tabs, and all that extraneous information about each tweet. Loquacious is all about being a true, Android-style application. Long-press a tweet to view the context menu to dig down, reply, retweet, view the links in the browser, etc.

Loquacious Tweet List Screenshot

Loquacious Tweet List Screenshot

Loquacious also has a couple of interesting features that set it apart. User and source filters allow you to filter out applications and users you might not care so much about seeing when you’re out and about. Multiple user support makes it easy to use for those of us with more than one Twitter account.

I’m certainly biased, but I firmly believe that Loquacious is the best Twitter app on Android so far. I’ve been using it as my sole client for two months now and couldn’t be happier.

It’s available now in the Android Market for only $2.99. Give it a shot and let me know what you think.

Count me among the many who got bitten by the 417 response bug from Twitter over the holiday break. What a fabulous present, thanks.

Anyway, all the information on the net seems to cover fixing this problem ASP.NET applications, which isn’t a lot of help for my Android application using Apache HTTP Components.

Here’s how you fix the problem in your org.apache.http based Java application:

mClient.setParams(new BasicHttpParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false));

Where mClient is your DefaultHttpClient.

There are lots of places around the web that have good examples for displaying images from the web in Android using java.net. However, the app I’m working on at the moment uses Apache’s HTTPComponents for communicating with the interwebs and I wanted to be consistent in using that throughout. So, in the spirit of giving, here’s how I’m displaying images using HTTPCompoents:

  1. Execute an HTTPGet for the image URL.
  2. Get the entity from the HTTPResponse, convert it to an InputStream.
  3. Run the InputStream through BitmapFactory.decodeStream().

Voila! You have a Bitmap that you can display using an ImageView.

// Initialize me how you like
private DefaultHttpClient mClient;
/**
* @param url the url of the image to attempt to download
* @return the Bitmap of the url, null if anything goes wrong
*/
public Bitmap getImageForUrl(String url) {
  Bitmap b = null;
  HttpGet getter = new HttpGet(url);
  try {
    HttpResponse r = mClient.execute(getter);
    b = BitmapFactory.decodeStream(r.getEntity().getContent());
  } catch (Throwable e){
    e.printStackTrace();
  }
  return b;
}

Quick and easy.

Twitter API Change

December 13th, 2008

It was very helpful of the Twitter folks to change their API so that the verify_credentials methods gives a representation of the user on success.

It was not so helpful to stop returning “authorized”:true in the response because now my login method doesn’t work.

That will teach me to use the response code rather than the payload to verify login.