Android Architecture
Before diving into designing and developing an application, it is important to understand the architecture of Android platform. Here is a blog to make you understand the layers in Android.
Android
Android is a Linux based, open source software stack created for working on many devices and configurations.
Let us understand the software stack that includes major components in an Android system.
As per the above diagram, Android stack is categorized into below layers:
- Linux Kernel
- Hardware Abstraction Layer [HAL]
- Native C/C++ Libraries [Middleware] & Android Runtime [ART]
- Application Framework
- System Applications
Let us now understand every layer in-depth:
Linux Kernel:
Kernel is always the main component that provides life to an Operating System. The sole responsibility of a kernel is to manage
- Memory
- Power
- Drivers
- Resources
It behaves as an abstraction between the Hardware layer and the remaining stack
Hardware Abstraction Layer [HAL]:
HAL is a middle-man who exposes the hardware capabilities present in the Kernel to the Application Framework. The framework cannot access all the hardware properties of the devices directly because the components used by the application can modify it. So, there has to be a mediator who provides the functionality of the requested property. HAL does it right away.
Native C/C++ Libraries:
The core components, services are coded in C/C++ and are included as a part of native library to help in providing the functionalities to the Android application. Few of them are listed below:
Webkit: Open source web browser engine that displays the web content
Media Framework: To provide support for playing and recording the audio and video.
Open GL ES: Used for graphics
Open MAX AL: Codec Software
LibC: C Runtime library
SQLite: For database operations
Surface manager: Displays the contents
Android Runtime:
The core libraries present in the ART will enable us to implement android applications using standard JAVA programming language.
Application Framework:
Android architecture has provided API’s [Application Programming Interface] to access the features available in Android OS.
If we need to access any of the “core functionalities” in Android, it is exposed through API’s. Few of the feature set are listed below:
View System: Android provides enriched set of UI materials for easier and simpler implementation.
Resource Manager: This provides access to non-coded resources such as localized strings, drawables, layout files etc.,
Notification Manager: Provides alerts and enables the app to display it in the status bar.
Activity Manager: Manages the lifecycle of the application and helps in maintaining the back-stack.
Content Providers: Enables the application to access the data apart from their own application and to share it [Example: Contacts]
Application Layer and System Apps:
This belongs to the top layer that is visible to the user.
All the application that we use, be it a System app[Pre-installed apps such as Contacts, Camera, Settings etc.,] or the ones downloaded from Play Store will be working on the application layer with their own ART. All the app in the device uses the Application framework to run and execute their functionality.
This is all about the Android Platform Architecture. Stay tuned for updates! 🙋🏻