November 12, 2007

Google Android SDK released

As you may know, Google released the first Android (Open Handset Alliance) SDK today. Below the cut: a brief summary of points that might be interesting to some of you.

  • It is not J2ME or J2SE -- it's Java with Google's own special Android class library. (This approach is similar to what Danger did with their Java implementation, which was not J2ME compatible until very recently.)
  • UI: There is no AWT, Swing, or J2ME's funky Displayable-based UI. There are no J2ME midlets or applets. There's a set of new UI classes, including View and Canvas.
  • Rather than MVC application breakdown, apps are broken up into task-specific Activities and Views. Your application might support multiple Activities (creating an email, reading an email, searching your mailboxes). For each activity you might have one or more Views of that Activity. There are a few other building blocks such as Services (background code exportable to other applications), Intents (systemwide code invocation), ContentProviders (making data available between apps in a safe and consistent manner).
  • Network: Uses standard* classes instead of funky J2ME Connection classes.
  • There is indeed a defined optional API for camera and microphone access (MediaRecorder). Output is recorded to the filesystem (which presumably could include flash, RAM, network devices).
  • The security model is such that application permissions are set at install time, based on permissions declared in the application package and user interaction, instead of bugging the user every time the application tries to run a restricted API. The security model gives each application a unique Linux user ID at install time, and runs each application in a separate process.
  • Provides a unique ContentProvider API for allowing you to export application data in a sensible way, and obtain access to data from other applications. For instance, this could be how you obtain photos already captured from the user's "Gallery".
  • A Location Based Services (LBS) optional API is defined, as is an interface to directly interacting with some nifty Google Maps classes for processing and displaying map data.
  • Applications are intended to run each in a single process, in cooperative multitasking manner, handling UI events quickly. An application management process monitors whether your application is responsive and will show an Application Not Responding (ANR) dialog to users within 10 seconds if your app doesn't process events quickly.
  • Provides an interesting MessageQueue/Handler mechanism for allowing you to pass messages between your main thread and child threads, create delayed actions, and so on. This allows you to easily coordinate compute-intensive background tasks with foreground tasks such as UI.
  • There's a straightforward way to get access to the phone's address book / Contacts via a standard ContentProvider.
  • Direct database support is provided (via SQLite) instead of the funky J2ME RMS.
  • There's a plugin for the Eclipse IDE, though you can build Android apps without Eclipse.
  • There's a full suite of debugging and tracing tools, all of which will apparently work either with the emulator or a tethered device. For more info, check out
    Posted by todd at November 12, 2007 03:46 PM