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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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:  203190 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



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.