Saturday, January 28, 2012

HTTP Clients for Android

Android Developers Blog: Android’s HTTP Clients

I read the above post back in the fall and thought, "yeah yeah, I'm using HttpURLConnection, so need to think about this at all."

Well this week I found some odd, frustrating behavior and decided to try the Apache HTTP Client to see if it gave different results. And oh boy, does it -- it always just works!

OP Jesse says Apache has "fewer bugs" on Froyo, which is my target release. I guess I should have switched sooner. But now I have!

Sunday, January 22, 2012

Android Emulator | Android Developers

I can never find this when I need it, i.e. when I forget which keys simulate the menu and search buttons. Note to self, they're F2 and F5.

Android Emulator | Android Developers

Friday, January 06, 2012

(Semi-) Auto-complete your declarations

Too lazy to type the class name of the variable you're declaring? Or maybe you can't remember the exact name of the class.

Well let's say you're declaring and assigning, like this:

SomeTypeName foo = something.getFoo();

But you can't remember the SomeTypeName part. Try this instead:

String foo = something.getFoo();

Eclipse will underline the error (oh yeah, you have to be using Eclipse, but who isn't??) and all you have to do it press Ctrl/1 (or Cmd-1 if you're on a Mac) and the quick fix will pop up,

Change type of 'foo' to 'SomeTypeName'

Just hit Enter and you're done! You're welcome!! :)