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:  274426 views
Comments:  

Android terminology

A typical Android application has the following components. Also given below are definitions provided by the Android Developer site:

  • Activity — An activity presents a visual UI for one focused endeavor the user can undertake. For example, an activity might present a list of menu items users may choose from, or it might display photographs along with their captions. A text-messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and other activities to review old messages or change settings. Though they work together to form a cohesive UI, each activity is independent of the others.
  • Content providers — A content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in a SQLite database, or in any other logical manner.
  • Service — A service doesn't have a visual UI, but runs in the background for an indefinite period of time. For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it.
  • Broadcast receivers — A broadcast receiver is a component that does nothing but receive and react to broadcast announcements. Many broadcasts originate in system code — timezone-change announcements, low-battery announcements, language-preference changes, etc.

Some other terms worth knowing:

  • Intent — Activities, services, and broadcast receivers are activated by asynchronous messages called intents. An intent is an Intent object that holds the content of the message. For example, it might convey a request for an activity to present an image to the user or let the user edit some text.
  • Intent filter — An Intent object can explicitly name a target component. If it does, Android finds that component (based on the declarations in the manifest file) and activates it. If a target is not explicitly named, however, Android must locate the best component to respond to the intent. It does so by comparing the Intent object to the intent filters of potential targets. A component's intent filters inform Android of the kinds of intents the component is able to handle.

For an understanding of these components, refer to "Develop Android Applications with Eclipse" and the Android Hello, World tutorial.

2 of 12 | Previous | 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=