Thursday 31 January 2013

Components of Android

Android has basically four components which it uses to manage all the applications.
These are as follows:-

    Components of Android
  1. Activity
  2. Content Provider
  3. Broadcast Reciever
  4. Service
Here is just the overview of the components of Android.These components of android will be discussed in later posts.

1. Activity:- Activity is an visible component of android which is used to display the user interface to the user just like a frame in awt or swing.Interface is made using Xtensible Markup Language(XML).To use this, Activity class is provided by the android.Activity is full java based class.

2. Content Provider:-  This component provides the facility to share database between different applications.
e.g. As the contact detail is saved in contact application but we can use that information in other applications like Phone Dialer, Messaging, call, etc.
This facility is provided by Content Provider.

3. Broadcast Reciever:- This android component provides the facility to communicate between two or more applications. It is used by the application to broadcast its change of state to other applications.
e.g. Whenever we are listening music and a call is received at the same time, then in this situation music player is paused automatically and when the call is ended, Music player is resumed automatically.
This is done with the help of Broadcast Reciever.

4. Service:- Services are used to provide the facility for starting long running tasks which perform some operation in background and doesn't require much user interaction.
e.g. Downloading a file from network, playing some music in background,etc.
These tasks never interrupt in other applications.


These four components are the basic components which will discussed briefly in later posts with examples.

0 comments:

Post a Comment