Basics of an Andriod Application(Simplified)

Andriod applications are written in Java programming language. Each Andriod Application can have 4 basic components.

Activities

You can say Activity is a set of UI components available for users to be used , at some specific instant of time. For example; an Activity in image viewer application can be image and its description and navigation available. Moving from one activity to another is accomplished by having the current activity start the next one. Each visual component in an activity is called view and is derived from base View class.

Service

Service runs in background for an indefinite period of time and doesn't have an interface. Each service extends Service Base class.

Service usually is involved in background work, while the user is busy with Activity. let us take an example of a car racing game.It may consists of several Activities like one displaying game status and controls to move the car. And there can be a service playing the background music.

Broadcast receivers

A broadcast receiver is a component which receives a broadcast message and takes some action based on the message. Broadcast receiver can start an Activity in response to Broadcast message of battery low, SMS received, or alarm clock time out. Each broadcast receiver extends BroadcastReceiver class.

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 an SQLite database. Each content provider extends ContentProvider base class.

Written by inam on December 20, 2009 under Andriod.

Comments

No Comments

Add a Comment

* means field is required.

Name *

Mail *

Website