Previous  | Next  | Home

Introduction


 

Android is an operating system and software development kit written by Google, running on smartphones, tablet computers, and other such small, mobile devices. It was introduced in 2007, but only in 2009 did significant numbers of Android-powered devices begin to be available. As of late 2010 there were more than 100 different Android phones on the market worldwide (most having appeared only within the past year), with more coming and the first serious tablet Android computers beginning to make their appearance. Since the devices that run Android are small, highly-connected computers, often with sensors like GPS, acceleration, magnetic field, etc, they (and their competitors, like the RIM Blackberry, Apple iPhone, Microsoft Windows Phone, and Nokia Symbian systems) are the future of web communication and mobile computing.


From late 2009 when the first highly-capable Android phones began to hit the market until late 2010, Android enjoyed a greater that 1000 percent increase in worldwide market share (from around 3 percent to around 30 percent), and there are at present no signs of slowing. Preliminary data from the 4th quarter of 2010 indicates that Androids accounted for more than 50% of smartphone sales in the U. S., and 33% worldwide (overtaking Nokia Symbian systems for world leadership). This Android explosion has led most independent analysts to conclude that Android is now the dominant mobile operating system worldwide. Even more striking, some analysts project that the rapid shift of many everyday computing tasks away from the desktop personal computer (PC) to cloud-based mobile and tablet devices could make Android the dominant operating system on any device, displacing even Microsoft Windows worldwide as the most commonly used computer operating system within the next several years.

Our primary interest here is in the technical aspects of how to program Android devices, with particular emphasis on scientific and educational applications. But it is important to understand at least in outline the features and appeal of an operating system that is presently (late 2010) inspiring consumers to activate more than 300,000 new Android smartphones per day.

 

Android Tools Are Open-Source and Free

Unlike say the iPhone, which is a proprietary device with hardware and software development tightly controlled by Apple, Android is designed to run on many devices produced by many hardware manufacturers, and is based on free, open-source resources. It is programmed with a combination of Java and XML. One can develop programs on an emulator running on a regular computer, so it isn't even necessary to have an Android device to begin writing programs. There is a powerful and very well documented Software Development Kit (SDK) that is freely available, a comprehensive Interactive Development Environment (IDE) called Eclipse with an Android plugin that is free, and the Java and XML (with their editors, compilers, and interpreters) with which one programs Android devices are also free.


There is even a free new drag-and-drop development tool called Google App Inventor that claims to allow even non-programmers to write basic Android applications (it has been tested with 6th graders; see this overview).

 

Android Is Designed to Operate a Multitasking Mobile Computer

It has been suggested that a good way to view the difference between an Android smartphone and the rival iPhone is that an iPhone is an iPod (music player) with a phone and some applications, but an Android is a computer with a phone. It is an overly simplistic description, but one that cuts to the heart of the matter. Android was not adapted from some other task to run smartphones. It was designed from the ground up as a modern operating system for phones, tablets, and related embedded devices.

A telling point is the issue of multitasking, which is a no-brainer for any modern computer. Google understood that from the beginning and figured out how to give Android users a multitasking experience even on devices that were too hardware limited (no swap space) to implement multitasking in the traditional way. In contrast, Apple did not enable multitasking for app developers on the iPhone 3G (arguing that it wasn't important, and obfuscating the issue with largely irrelevant discussions of battery life), and only belatedly introduced a limited form of multitasking for the iPhone 4. This latter point of view makes some sense for a multimedia player, but not for a computer.

 

All Apps Are Created Equal

A notable feature of Android is that there is no division of the applications programming interface (API) into a part available to general developers and a special part available only to Google software engineers and specially-annointed developers. The API that you can download off the Web is the same one that Google engineers use. This is unusual for a smartphone. A related issue is that, in general, on an Android phone you are free to change out any application for a 3rd-party one or one that you write yourself. This includes the "System" applications such as Contacts, Email, the Calendar, and so on. Google refers to this as "all apps are created equal", and it represents a subtantial departure from the management of applications on other smartphones.


There is one interesting qualification of the preceding statements. Some manufacturers and providers have, presumably in response to financial incentives, locked in certain applications, making them difficult (though typically not impossible for the clever) to swap out. For example, Verizon has on a couple of recent phones installed and locked in Microsoft Bing as the default search engine, instead of the more logical Google. This doesn't prevent the user from using Google, but makes it difficult to set it as the default search.

Some Android purists have urged Google to do more to prevent this. Interestingly, Google has declined on the grounds that to do so would violate the spirit of open source development. Android is about options, for both users and manufacturers. A Verizon user unhappy with Bing as the default search engine has many other choices (from Verizon, or from other carriers) of Android phones that make Google the default search. The manufacturers are free to try to lock down particular applications on a device, but they will pay for their choice in the market place if it is an unwise one.

The qualifications discussed in the preceding box affect only a few applications on some devices. For the most part, "all apps are created equal" rules on Android devices.

 

Getting Started Is Easy

The iPhone requires a Macintosh computer for standard development; in contrast, the software required to develop Android applications runs on all flavors of desktop and laptop computers (Linux, Mac, Windows). It can all be downloaded from the Web, with minimal hassle. There are good books that you can buy, but it isn't essential since the documentation is freely available on the Web, and most problems that you encounter have been encountered before in some guise by others and a little Googling will usually suggest solutions. Furthermore, there are many code examples included with the SDK illustrating how to do things.


For several years I used an iPhone 3G. It was an innovative device for its time and I was very interested in figuring out how to program it. But I could never quite motivate myself to climb over the artificial barriers erected by Apple (for example, having to buy a Macintosh that I didn't need for anything else just to program a phone, and Apple's in loco parentis approach to who could program iPhones and what tools they could use). In contrast, when I decided to figure out how to program Android it took about 2 hours from sitting down at the computer to see what I needed to download and install to having a rudimentary working program displayed in an emulator (at that point I didn't even own an Android phone).

 

The Smartphone Revolution

The developments described above herald a revolution that I believe will eventually have an impact comparable to that associated with the introduction of the personal computer and the development of the internet and world wide web. This revolution will put in the pockets of potentially billions the computing power of a powerful desktop computer of a decade ago, with unprecedented access to communication tools and device sensors. The challenge as programmers is to use this opportunity in creative ways. This requires both original thinking and technical expertise in programming the Android API. This material is about how to program Android for many common tasks. The original thinking is up to you!


Previous  | Next  | Home