Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Introduction to Android development Using Eclipse and Android widgets

Ayushman Jain (ayushman_jain@in.ibm.com), Eclipse JDT/Core Committer, IBM
Ayushman Jain works on the Eclipse team at IBM India Software Labs, Bangalore, as a JDT/Core committer. He leads the Eclipse@campus initiative to evangelise Eclipse in Indian universities. He is enthusiastic about Android as a platform and encourages its use due to ease of development on Eclipse familiar environments. He is also the technical editor for a youth magazine called NOW, in circulation in Delhi, India. For NOW, he has reviewed HTC phones based on Android.

Summary:  This tutorial is intended for anyone interested in beginning Android development on Eclipse using the Android development tools plug-in. It offers insight into the salient features of an Android app, along with a brief explanation of its basic components. The Android process is introduced for developing rich UIs for the apps, as widgets. Finally, it showcases how easy it is to test the developed app by deploying it on an Android device simulator included in the SDK.

Date:  16 Nov 2010
Level:  Introductory PDF:  A4 and Letter (612 KB | 31 pages)Get Adobe® Reader®

Activity:  275235 views
Comments:  

Introduction

Android is a mobile operating system, similar to Symbian, iOS, Windows® Mobile, and others. It was initially developed by Android Inc., a company later purchased by Google. It is now owned by the Open Handset Alliance and is fully open sourced, accounting for its growing popularity. Google released most of the Android code under the Apache License. With this license, vendors can add proprietary extensions without submitting them back to the open source community. Many versions of Android have hit the market since its inception (the most recent as of Q3 2010), including the power-packed Froyo (V2.2). Android has moved beyond simply being a platform for mobile devices; the new Google TV also runs on Android.

Android uses a modified Linux® kernel and allows applications to be developed in Java™ technology using Java libraries (some of which were developed by Google for Android). While Android applications are written in the Java language, there's no Java Virtual Machine in the platform, and Java byte code is not executed. Java classes are recompiled into Dalvik executables and run on a Dalvik virtual machine. Dalvik is a modified VM for Android and optimized devices running on battery power and with low CPU.

For developers, Android SDK provides a rich set of tools, including debugger, libraries, handset emulator, documentation, sample code, and tutorials. Android applications can be easily developed using Eclipse (Android's official development platform) with the help of a plug-in called Android Development Tools (ADT). This helps leverage Eclipse's rich features, such as content assist, Java search, open resources, JUnit integration, and different views and perspectives for developing an Android app. A wide array of widgets, which are similar to Java swing widgets, facilitate in creating a rich UI for the apps. A detailed Javadoc makes the development process quite easy.

Here, we start with a guide for preparing the system for Android development. We then touch briefly upon the salient features of an Android application using a basic Hello World Android app. We also talk about the files that make up an Android app and how the UI is separated from the implementation. After going through the process of creating, developing, and launching an Android app from Eclipse, we move on to a discussion about a few Android widgets that help in building a rich UI (a very important part of mobile apps). We demonstrate a few basic widgets with the help of a sample application. We also talk about using the listView widget in an phonebook-like application and the ways it can be implemented. In between, we also talk about permissions that need to be set in order to be able to have an application access some data from the OS. Overall, a few hours on the article should enable you to create an app implementing a basic functionality and with a nice UI.

System requirements

Before beginning Android development, please make sure you have the following installed:

  • Eclipse SDK — V3.5 is suggested for use with the latest Android SDK. This can be downloaded from the Galileo download page.
  • Android SDK
  • Android Development Tools (ADT) — This is an Eclipse plug-in. It is the equivalent of JDT (Java Development Tools) for Android Development. Please follow the detailed instructions for installing the ADT plug-in, and also for setting the location of Android SDK in Eclipse.

1 of 12 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Industries
ArticleID=580033
TutorialTitle=Introduction to Android development Using Eclipse and Android widgets
publish-date=11162010
author1-email=ayushman_jain@in.ibm.com
author1-email-cc=