The Beginner’s Guide to Android: Android Architecture
There are a wide variety of components in the Android architecture that work together to meet the requirements of any Android device. Several C/C++ libraries are included in Android’s open-source Linux kernel and made available via the software’s framework services. The Linux Kernel and the Dalvik Virtual Machine (DVM) are two of the most important parts of a smartphone, as they are responsible for the OS’s core features and the platform on which Android apps can run.
The following are the fundamental building blocks of Android :-
- Platform Libraries
- Application Framework
- Android Runtime
- Linux Kernel
Libraries that help with application frameworks, user interface design, graphic creation, and database access are all examples of such libraries. To aid in android development, the Platform Libraries provide a variety of C/C++ core libraries and Java based libraries including Media, Graphics, Surface Manager, OpenGL, etc. Here’s a rundown of some of the most important basic Android libraries a developer can use:
- The media library allows for the playing and recording of a wide variety of media types.
- Managing the display subsystem’s user interface is the job of the surface manager.
- SGL and OpenGL are both examples of application program interfaces (API) that work across several languages and platforms. These APIs are used to create both 2D and 3D computer graphics.
- Both databases and fonts are supported by SQLite and FreeType respectively.
- Security technology known as SSL (Secure Sockets Layer) creates an encrypted connection between a web server and a browser.
- Android‘s foundational app, android.app, gives developers access to the platform’s app paradigm
- The android.content package allows apps and their parts to easily share and communicate over the content.
- Access data from content providers with the help of android.database package, which is equipped with SQLite database management classes and is used to access data from content providers.
- The android.opengl package adds OpenGL ES 3D graphics delivering API support to Java.
- The android.os file allows programs to make use of the features often available only on servers, such as sending and receiving messages and interacting with other processes.
- The android.text component is utilized to render and manage text on the display of a device.
- android.view refers to the core building pieces that are used to construct user interfaces for applications.
- A. android.widget is an extensive library of pre-made UI elements like buttons, list views, radio buttons, labels, layout managers, etc.
- android.webkit is a collection of classes designed to facilitate the incorporation of web-browsing functionality into software.
In Android, applications sit atop the architecture. All of your apps—both the ones that came with your phone like Home and Contacts and Camera and Gallery and the ones you’ve downloaded from the Play Store like Chat apps, Games and Browsers, and Everything Else—will be stored here.
It utilizes the Android run time and its accompanying classes and services in order to function.
For developing an Android app, the Application Framework includes a number of crucial classes. To better manage the user interface and application resources, it provides a generic abstraction for accessing hardware. In general, it offers the means by which a new class can be crafted and made useful in the development of applications.
It has several useful services that we can use to build our app to meet the specifications, such as an activity manager, a notification manager, a view system, a package manager, and so on.
- The Activity Manager is responsible for controlling all facets of the application lifecycle as well as the activity stack.
- Content Providers are responsible for enabling apps to publish data to be shared with other applications.
- The Resource Manager gives developers and designers quick and easy access to non-code embedded resources including strings, color settings, and UI layouts.
- The Notifications Manager facilitates the showcasing of alerts and notifications from many applications.
- The View System is a library of customizable views for developing program interfaces.
Among Android’s most crucial components is the Android Runtime environment. Essential libraries and the Dalvik VM are included (DVM). It primarily serves as the framework’s foundation and the engine that drives our application with the support of the core libraries.
Dalvik Virtual Machine (DVM), like Java Virtual Machine (JVM), is a register-based virtual machine that has been custom-built and optimized for Android to facilitate the simultaneous execution of numerous processes on a single device. For threading and low-level memory management, it relies on the Linux kernel layer. Android application development in the industry-standard programming languages JAVA and Kotlin is made possible by the core libraries.
The Linux Kernel is at the core of Android’s architectural design. It takes care of the drivers that are needed at runtime, such as the display driver, Bluetooth driver, audio driver, camera driver, memory driver, and so on. An abstraction layer between the hardware of the device and the rest of the Android architecture is provided by the Linux Kernel. It controls the system’s resources like RAM, battery life, and peripherals.
Linux kernel capabilities include :
Managing Memory : It takes care of memory management for us, so we can focus on making our apps.
Security : Linux’s kernel is responsible for protecting data transmitted between applications and the operating system.
Network Stack : It manages network communication effectively.
Process Management : It effectively manages the process and assigns resources to processes as needed.
Driver Model : It verifies that software is compatible with the device and holds hardware makers accountable for integrating their drivers into Linux.