Android Architecture – 5 Components of Android Architecture
In this article, we will study Android architecture. We will cover five basic components of Android architecture and their functioning. Moreover, to develop Android applications, Android developers need to have a deep knowledge of the architecture of Android.
Do you want to become an Android Professional? Join Android Telegram Channel
1. What is Android Architecture?
Android is a mobile operating system that has an open-source framework and is based on Linux which helps us to develop advanced and user-friendly applications.
Now, we will start with Android Architecture, it comprises of five levels, which are the Linux kernel, Libraries, Application framework, Android runtime, and System applications.
i. Linux Kernel
Linux kernel is the bottom-most and important layer of the Android architecture and it is the core part of Android architecture.
It provides features such as:
- Process management
- Memory management
- Device management
It is also responsible for a level of abstraction between device hardware and upper layers of Android architecture. It consists of device drivers like camera, flash memory, Display, keypad, Wifi etc.
This layer consists of a set of Libraries and Android Runtime. The Android component is built using native codes and require native libraries, which are written in C/C++ and most of the libraries are open source libraries. Also, this layer handles data that is specific to the hardware. Some of the native libraries are SSL, SQLite, Libc, OpenGL, media framework, FreeType and Surface Manager.
iii. Android Runtime
It comprises of DVM (Dalvik Virtual Machine). Just like JAVA uses JVM, Android uses DVM to optimize battery life, memory and performance. The byte code generated by the Java compiler has to be converted to .dex file by DVM, as it has its own byte code. Also, multiple class files are created as one .dex file and the compressed .jar file is greater than the uncompressed .dex file.
iv. Application Framework
The application framework built on top of the native library layer provides us with Application programming interface and higher-level services. Also, the features of the Android operating system are available to us through API’s written in form of JAVA classes. And, Android developers use these high-level services to build applications.
It also consists of an Android Hardware Abstraction Layer (HAL) that allows the Android Application framework to communicate with hardware-specific device drivers. It acts as an interface for hardware vendors to implement. An android application uses HAL APIs to get commands from different hardware devices.
The application framework consists of following key services:
- Activity Manager: The method in this class uses testing and debugging methods.
- Content provider: It provides data from application to other layers.
- Resource Manager: It provides access to non-code resources.
- Notification Manager: The users get notification about all the actions happening in the background.
- View System: It acts as a base class for widgets and is responsible for event handling.
It is the top-most layer of Android architecture. This layer consists of native Android applications and third-party installed apps. They are bundled in an Android package and all the applications that are to be installed are written in this layer only such as contacts, games, settings, and messages.
In this article, we have studied the Android architecture and its various layers consisting Linux kernel, Android runtime, application framework, and Android apps, in detail. Also, the benefit of learning about architecture, as an Android developer is that it becomes easy to add new features if there are separate components. Hope you liked our article. Furthermore, if you have any query you can ask us in the comment section.