A first look at Android

twitt3r_032.jpg

By Franklin Garcia, Software Developer, Java Group

OpenAlliance recently released an “early look” edition of its Android platform. Android is a set of software for mobile devices: an operating system, middleware and mobile applications. Built on the open Linux kernel, it utilizes a custom virtual machine called Dalvik. OpenAlliance hasn’t yet released the SDK code, but promises to “open it” in the future. The SDK provides a phone emulator, debugging tools and sample code.

Looking at the official Google Group page, there is a lot of documentation available– everything you need to get started. However, when I began to code my application I found incomplete or wrong information on some pages; for example, if you look at the List of Views in Reference Information, the list is not exhaustive. This is understandable as we’re dealing with a recent release.

To see for myself if all the good things that OpenAlliance and Google are saying about Android are true, I took a couple of days to build an Android application (which I named “Twitt3r”). The first good thing I found: the SDK is based on Java and other libraries from Apache (or at least it’s good for me, a Java developer). The application to code from scratch uses Twitter.com REST API to retrieve and send data. Twitter.com is a micro blog site, where users “post” simple messages responding to the question: What are you doing? As an anonymous guest, you can see others’ micro blogs, and see the public timeline (all posts ordered by post date and time). As a registered user, you receive your own blog (http://twitter.com/<yourusername>) and can “follow” your friends from post to post.

While developing this simple application I was able to test networking access (accessing the REST API) and authentication (needed for user-only features), parse XML (Twitter REST API has three flavors, XML, JSON and RSS) and code a normal application with multiple screens.

In general, I really like Android. It is as easy to develop as Java Micro Edition, but with the full power of the core of Java Standard Edition (you won’t need to use Swing here). You only need to take care of your code and what you want to display on the screen. How to display it and how to handle events are managed by the system. Actually, you need few code lines to get a good looking application running. This is because you can define your entire UI using just XML. But if you like the old school programming style, you can code the whole UI.

The Android Developer community is growing quickly and is very active (the official group is hosted by Google at http://groups.google.com/group/android-developers). With such notable companies as NTT DoCoMo, Samsung and Motorola being part of OpenAlliance, I think Android has a lot of potential and it will give us great surprises in the coming months.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*