Understanding the Building Blocks of Android

Wednesday, May 17th, 2017


In this post, we are discussing about the four fundamental building blocks from which all the android applications builds. These building blocks are implemented as Java classes.

Android Component

Pictured above is a diagrammatic representation of android application fundamental which explores android components and other fundamentals by Romain Chiappinelli.

There are four major building blocks of Android, let’s understand them.


Anything that is visible to the user has an activity. So, an activity is the primary class, defined to present the graphical user interface to the user and capture user’s interaction through that interface. An activity should support a single focused thing that the user can do. Example: any UI visible in the app.


Unlike activities, services don’t need any user interface and runs in the background thread. We basically place long running operations in services. They provide a way for different processes to request operations and share data. Example: music application, while playing a song, it still plays in the background even though we close the app.

Broadcast Receiver

Broadcast receivers are the fundamental components that listens to and responds to events. It acts as a subscriber that listens to its required Intents and respond to it. Example: messaging app, shows a notification when we receive a message.

Content Provider

If an application manages data and needs to expose that data to other applications, we use Content Providers. It allows applications to store and share data. If an application needs to access data from another application this can done through Content Provider of that application. The access might read or write or both operations. Similarly, content provider provides data to the same containing application as well. Thus, we can say content provider is a database style component that handles inter-process communication between applications. Example: messaging app, explores our contacts through contacts application.

Related Articles

  • Youtube Ad Auto-skipper

    Like many people, YouTube has become my primary source of music. I listen to its automatic playlists all the time, and the fact that it seems to learn my preferences and introduces me to new music is just awesome. There is just one annoyance: YouTube ads Now, I don’t hate ads. I actually find them […]

    read more
  • Caching Server

    Squid: Saving your internet bandwidth

    With the increase in a number of digital devices, organizations are facing bandwidth issues. Users within the organization are downloading same content multiple times resulting in the consumption of international bandwidth. A simple solution might be to increase the bandwidth. But, can there be ways to solve this problem? The answer is “YES”. Caching servers […]

    read more

Let us build something great together!

Start a project