MY mENU


Monday 6 February 2012

Components of Android


Components of Android are:


         1. Activities
         2. Services
         3. Broadcast Receivers
         4. Content Providers.


           Activity is the basic building block of every visible android application. It provides the means to render a UI. Every screen in an application is an activity by itself. Though they work together to present an application sequence, each activity is an independent entity.


          Service is another building block of android applications which does not provide a UI. It is a program that can run in the background for an indefinite period or perform various persistent actions such as playing music etc..


          Broadcast Receiver is yet another type of component that can receive and respond to any broadcast announcements. 


          Content Providers are a separate league of components that expose a specific set of data to applications.


          Intent is a class that contains several fields describing what a caller would like to do. Intents are messages that are passed between components. Intent is a bundle of information, a passive data structure that holds an abstract description of the operation to be performed.(or in the case of broadcasts, a description of an event that has happened and is being announced). 
 E.g. opening a PDF file is an intent, and the Adobe Reader is the suitable activity for this intent.


NOTE: Intents can be made to work exactly like API calls by using what are called explicit intents. 

No comments:

Post a Comment