Understanding the Building Blocks of Android

In this post, we are going to discuss the four fundamental building blocks from which all the android applications are built. 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 visible to the user has an activity. Activity is the primary class which is 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. Eg: any UI visible in the app.


Unlike activities, services don’t require any user interface and run in the background thread. We place long-running operations in services. They provide a way for different processes to request operations and share data. e.g., music application, while we play a song, it is still playing in the background even though the app is closed.

Broadcast Receiver

Broadcast receivers are the fundamental components that listen to and responds to events. The broadcast receiver acts as a subscriber that listens to its required Intents and respond to it. Eg: a messaging app which shows a notification when a message is received.

Content Provider

If an application manages data and needs to expose that data to other applications, we use Content Providers. Content Providers allows applications to store and share data. If an application needs to access data from another application, this is done through the Content Provider of that application. The access might be read or write, or both operations.

Similarly, a content provider is used to provide data to the same containing application as well. Thus, we can say the content provider is a database-style component that handles interprocess communication between applications. Eg: messaging app which can explore our contacts through contacts application.

Originally Written by: Shilu Shrestha

Senior Mobile Developer @ Leapfrog Technology

Leapfrog Technology, Inc. is committed to helping clients design and develops high-performance mobile and web app that people love to use.

Find us on Facebook, Twitter, and Instagram

More in Insights

8 DevOps Tools and Services We Love Technology

8 DevOps Tools and Services We Love

The core focus of any DevOps team is evolving and improving products rapidly. At Leapfrog, we value the speed at

Read more
How We Moved Towards Serverless Architecture Technology

How We Moved Towards Serverless Architecture

The scalability, flexibility and reduced cost promised by serverless architecture resulted in a massive growth rate of 75% compared to

Read more
Enhancing Git Workflow with Smart Commit Open Source Tool Technology

Enhancing Git Workflow with Smart Commit Open Source Tool

When you have a predefined process, it is generally a good idea to automate the things that can be and

Read more