Download Free Eclipse & Android Installation.pdf Gene Apps are written in Java, and run on Android, Google’s mobile device operating system. Android is based on Linux, and is freely available under the Apache license. The Android Software Developer’s Kit (SDK) is freely available from Google, but is not completely free; there are some restrictions in the license. The SDK contains tools for compiling Java Bytecode into Dalvik executables, which is what Android runs rather than a standard JVM. It also contains tools for loading applications into an Android emulator, and an emulator that you can run that looks and behaves like a running GPhone.

Developing Android applications is a bit like developing Java Applets, but with a few crucial differences. Rather than extending Applet, you extend Activity; so you have to learn what the Activity object does, and what methods you need to override. Also, unlike Applets, you don’t use Swing or the AWT to control your user interface, but instead you can specify Android’s View objects using XML (almost like writing a Web page). An Activity is one of four types of Object that may be bundled into a complete application: it represents what the user is doing right now, so it is useful for us to focus on as part of a UI course. The other three components are Services, which run in the background a bit like Unix daemons; Broadcast Receivers which do nothing but react to broadcast announcements (such as that the timezone has changed, or a download is complete); and Content Providers which make data from one application available to other applications.

To begin writing an Android application, you write a Java class that extends the Activity object. You can do this using a text editor, but there is a lot of configuration to get right, so we are going to use Google’s “officially” supported IDE, which is Eclipse. You also need to install the Android SDK, which is a set of command-line tools. To do this, you need enough Unix knowledge to add a set of executable files to your PATH environment variable.