Google Android - a sneak preview
What's in it for developers?
Google invited developers to its London office for one of three workshops - the others being in Munich and Tel Aviv to spread the word and teach developers how to write for their new OS. Another event will be held in Boston on February 23rd (check at the blog for an announcement). Here's what they told us. The mantra for Android is that it’s "a complete and modern embedded OS, with a cutting edge mobile user experience, a world class software stack for building apps and open platform for developers users and industry". That of course breaks into lots of different specifics some of which are more solid than others. Computer people coming to mobile have a very different view of phone architecture to phone people adding features. Phone people see the phone functions - the GSM chipset, Bluetooth, DVB-H, for example, as a foundation, with drivers on top. Then there's an abstraction layer, an operating system, a user interface framework and the applications on top.
Computer people look at the system as a processor with a BIOS on top, then an OS, framework and applications. The bits that mobile phone people see as a foundation, the computer people see as an adjunct connected by drivers. Voice is just another application. And this approach was reflected yesterday.
Google are computer people. In this model Google’s openness does go all the way down, with lots of the proprietary bits off the side. In a phone model, Google only does the top layers.
What's included - and what's missing
The lowest level of this is a Linux 2.6 kernel which works as a Hardware Abstraction Layer to support the memory management, display driver, camera driver, Bluetooth, flash memory, USB, keypad, audio and power management. Note, this doesn't by itself let you get at the GSM stacks and chipset. Google is therefore reliant on the hardware vendors to supply drivers, or at least the tools to allow developers to write the drivers. With Qualcomm, Intel, Marvell, Broadcom and Texas Instrument as partners, that's quite optimistic.
Google supplies a number of libraries including the Surface Manager, which is the system that controls what goes into the framebuffer (the system manager for 2D primitives); a media framework (provided by Real), SQLlite, openGLS, Freetype, Webkit, SGL, SSL, IBC. Developers reported that 2D was faster using OpenGL than SGL, but as we've not yet seen real hardware, this will be down to the implementation.
Google is pleased with the speed of their software 3D rendering, but really expect that devices will ship with hardware acceleration. Some developers were worried about testing on lots of different screen resolutions. In practice this is less of a problem. The display manufacturers only make a limited number of sizes. The basic ones – 96x64, 128x128 and 128x160 are all too small for a smartphone. You might get a few at 176x220, but the vast majority of Android phones will be 320 x 240.
The real magic is the Android runtime called Dalvik. This is a custom virtual machine designed to be a better embedded OS. It's a register-based Virtual Machine, and therefore more efficient in an embedded environment than a traditional Java Virtual Machine; core libraries interact with the Java Harmony project. You may write in Java, but the byte code is Dalvik.
Dalvik uses .dex byte code files and Java class files are converted to .dex. The .dex structure allows processes to share system classes, saving memory.
It might be better optimised for the ARM foundation of a mobile phone but it sacrifices the maturity of J2ME, which has been through more than a decade of growing pains and has a lot of add-ons in the form of JSRs (Java Special Requests). Dalvik will have to re-invent all that. Some of the Open Handset Alliance members are JVM companies, and we'll see a traditional JVM for Android.
So all initial Android development is in Dalvik, thus disappointed many of the developers who were looking for a system which was better at hitting the metal of a phone than Symbian.