Android New Online Batch

New Android Online Batch Starts on Oct 16 2017

Monday, September 1, 2014

Android Application Components

Components of an Android Application :

An Android Application has 4 components :
1)    Activity
2)    Service
3)    Content Provider
4)    Broadcast Receiver

Activity :
                 An Android Application requires a User Interface(Screen) which is used by the user to interact with the Application. This User Interface is provided by a class called ‘Activity’.  
 Activity is nothing but an object that holds the User Interface screen.

Service :
               An Android Application has to perform some long-running operations like playing music, downloading a file which doesn’t require the User Interface (screen) as they work in background. All these tasks are defined by a class called ‘Service’.

Content Provider :
                        If one Android Application requires the data of other Android Application, then Content Provider comes into picture.
This class encapsulates the data of an Android Application which can be accessed by other applications if they have valid permissions.

Broadcast Receiver :
                        Many events may occur in the Mobile such as Battery Low, Camera has taken a picture, an SMS arrived, WiFi has been detected etc. Then your Application has to perform some action for those desired events. Then BroadcastReceiver class is used to handle those events which the Android System broadcasts. 

No comments:

Post a Comment