Google

Wednesday, February 19, 2014

Fundamental blocks of an Android Application

This article will provide an overview of the android application components from a developer's point of view.

In order to develop an Android application, we need to first know what components make up an android app. There are four fundamental components which form an Android App. These building blocks, which are implemented as JAVA classes, are:

  • Activity Class - Activities provide the GUI to the user of the application, enabling the user to enter and receive data. Therefore, we can say this component works in the foreground, i.e, is visible to the user.
  • Service Class -  Services allow the different processes to request operations and share data.
  • Broadcast receiver - This block can be considered like a dormant component, waiting for an event to occur, like a message to be received, or battery level going below 5% etc. and take actions like show notifications.

    broadcast receiver notification

    Consider, the watchman of your Apartment. He sits at the main gate of the complex, dormant. While you are inside your flat unaware of any activity occurring outside. Now say, some friend decides to visit you. This friend reaches the complex gates. The watchman sitting there, stops the visitor, finds out which flat this visitor wants to go to, and then notifies you through intercom that - You have a visitor! In this case the watchman acts like the Broadcast receiver of an Android application.
  • Content Provider - We have discussed the Content Provider before (read here). Content Provider enables data sharing between Android applications. It allows data to be centralised at one place like a database, however, it has many more other functions than being just a database.
Now that we have some idea of the organisation of our application, next we will delve into details in the next post.

Hope this Android Application Development tutorial is helping. If not, please lets us know.

Do you have Questions? Arguments? doubts?... we'll try our best to resolve

Please leave us a comment 

No comments:

Post a Comment

Have a suggestion or feedback... Please take a minute to tell me your opinion