Android Notebook, page 4

Wednesday, January 21st, 2009

Probably not a coincidence, but all this lifecycle stuff reminds me of applets, albeit with somewhat more complicated argument lists and fancier names. There are certain patterns that show up again and again. Event listeners are one. Event loops are another. And life cycle methods are a third. Sometimes the trick to learning a new system is recognizing the old patterns in new language. Of course, this can trip you up badly when the pattern is something truly new, and when you try to fit it into old mental models. You can also get tripped up by assuming that certain contingent details are the same in the new instantiation of the pattern as in the old one.

The tab key doesn’t work like you’d expect–it doesn’t advance from one field to the next. I’m not sure if this is a limitation of the framework or just the sample app. This is completely irrelevant on a phone, but may become important if third parties start using the Android platform as a base for netbooks.

Too much copy and paste , and not enough thinking in the tutorial. I should try to work backwards from the sample app on the screen to understand where the different fields are coming from. Let’s see there are:

Android Notebook, page 3

Tuesday, January 20th, 2009

Perhaps just because it’s an initial tutorial, but the event handling model feels like a sort of monolithic Java 1.0/Mac OS 6 event loop rather than the more flexible event listener based approaches of Swing and other more modern GUI frameworks.

Local variable access is much more efficient than field access in the VM. I guess the CPU (or battery) is too underpowered to do fancy JIT tricks, as I’d expect a good optimizer to account for this. Worth remembering. Hmm, does Dalvik even have a just-in-time compiler? Apparently not.

Android Notebook, page 2

Monday, January 19th, 2009

There’s a tab character in the sample file. Tab characters should not be used.

Android has an embedded SQL database, Useful.

I wish XML layout files would open in XML view by default rather than layout view.

The tutorial is a little flaky with XML terms. It’s an XML declaration, not an “XML header”.

Some things that look like XPath expressions at first glance, aren’t.

Trying to read a tutorial in one window and use Eclipse in the other is painful. Maybe if I put my laptop on the desk?

The tutorial’s naming conventions aren’t following Java standards. Someone likes to put “m” in front of all the instance fields.

XML localization and UI construction: nice.

Android Notebook, Page 1

Sunday, January 18th, 2009

Had to upgrade to Eclipse 3.4.1 to to get the SDK working. No big deal.

Hello World is now running. The emulator took a while to start up.

“Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.” Oh well, it’s just an emulator. No big deal.

It is nice that the emulator works well on a Mac.

G1 First Impressions

Wednesday, December 31st, 2008

So now I’ve had a little time to play with my G1 phone, and my initial impression is that it shows promise, but isn’t fully usable yet. In particular,

Best Android Book?

Thursday, December 25th, 2008

I suspect someone’s going to give me an Amazon gift certificate for Christmas, and someone already gave me an Android. What’s the best book for learning to develop or Android? There aren’t a lot of choices yet:

Which ones are worth the paper they’re printed on and which ones are headed for the recycling bin as soon as the next SDK version hits the ether?