Previous  | Next  | Home

Introduction


 

Android is an operating system and software development kit distributed freely by Google that runs on smartphones, tablet computers, and other such small, mobile devices. Development on Android began in 2003 by a small start-up, Android, Inc., which Google acquired in 2005. Android was announced publicly in 2007 and the first phone running it was released in 2008, but only in 2009-2010 did significant numbers of Android-powered devices begin to be available. Since that time there has been a virtual explosion in the popularity of Android and it has rapidly become the dominant mobile operating system in the world. 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 Apple iPhone, RIM Blackberry, and Microsoft Windows Phone) are the future of web communication and mobile computing.


The growth of Android use has been phenomenal. Although a few Android phones were available beginning in late 2008, the first highly-capable Android phones began to hit the market in volume only in 2010. By 2010-2011 Android had surged into the global lead in mobile phone operating systems and at the time of this writing (mid 2016) Android is running on more than 80% of mobile phones worldwide (and 60% of tablets), with the activation of android devices continuing to grow. Most analysts believe that the rapid shift of many everyday computing tasks away from the desktop personal computer (PC) to cloud-based mobile and tablet devices has made Android the dominant operating system on any device, displacing Microsoft Windows as the most commonly used computer operating system on the planet.

Our primary interest here is in the technical aspects of how to program Android devices. But it is important to understand at least in outline the features and appeal of an operating system that is inspiring consumers to activate more than 1.5 million new Android devices per day, and which Gartner Research predicts may be activated on 1 billion new devices in this year alone (with 75% of those activations in the developing world).

 

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 technology. 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 Android Studio that is free, and the Java and XML (with their editors, compilers, and interpreters) with which one programs Android devices are also free.

 

Android Is Designed to Operate a Multitasking Mobile Computer

In the early days of Android's competition with the Apple iPhone for mobile device supremacy it was suggested that a good way to view the difference between an Android smartphone and an 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 was an overly simplistic description, but one that cut 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 satisfying 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. Assuming that multitasking is not important makes some sense for a multimedia player with a phone, but not for a computer. Now, no one (not even Apple) doubts that mobile devices are computers that must be capable of multitasking.

 

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 installed and locked in Microsoft Bing on some phones 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 baked in as the default search engine has many other choices (from Verizon, or from other carriers) of Android phones that make Google the default search, or allow the user to specify 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 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 readily-available code examples illustrating how to do things.


For several years in the early days of smartphones 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 Mobile Revolution

The developments described above herald a revolution that will 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. The material presented here is about how to program Android for many common tasks. The original thinking is up to you!

Last modified: June 8, 2016


Previous  | Next  | Home