Android

Android Architecture: What it is?

Android Architecture: What it is?

Introduction

The Android architecture has a variety of parts to support the requirements of any android device. The open-source Linux kernel used by Android software includes a variety of C/C++ libraries that are made available through application framework services.

Out of all the parts, the Linux Kernel gives smartphones their primary operating system features, while the Dalvik Virtual Machine (DVM) offers a foundation for running Android applications.

The following are the primary elements of Android architecture

  • Android Runtime
  • Applications
  • Application Framework
  • Linux Kernel and
  • Platform Libraries

Applications

The top layer of Android architecture is Applications. Only this layer will be installed, neither the pre-installed applications like home, contacts, camera, gallery, etc., nor the third-party apps downloaded from the play store such chat applications, games, etc.

It utilises the classes and services made available by the application framework to function within the Android run time.

Application Framework

Application Framework offers a number of crucial classes that are required to build Android applications. It offers a general abstraction for hardware access and aids in controlling user interface resources for applications. In general, it offers the services needed to create a certain class and make that class useful for developing applications.

It comes with several services like activity managers, notification managers, view systems, package managers, and others that are useful for the development of our application in accordance with the requirements.

Android application runtime

One of the most vital components of Android is the runtime environment. It includes elements such as the Dalvik virtual machine and essential libraries (DVM). It primarily serves as the foundation for the application framework and, with the aid of the core libraries, powers our application.

Similar to the Java Virtual Machine (JVM), the Dalvik Virtual Machine (DVM) is a register-based virtual machine that was created especially for Android and optimised to run multiple instances effectively on a single device. Threading and basic memory management are reliant on the Linux kernel layer. With the help of the core libraries, we are able to create android applications in either the common programming languages of Java or Kotlin.

Platform libraries

The Platform Libraries are a collection of essential C/C++ libraries and Java-based libraries including Media, Graphics, Surface Manager, OpenGL, etc. that facilitate the creation of Android applications.

  • The ability to play and record audio and video formats is provided by the media library.
  • Access to the display subsystem is managed by the surface manager.
  • For 2D and 3D computer graphics, there are two cross-platform, cross-language application programme interfaces (APIs): SGL and OpenGL.
  • Database support is provided by SQLite, and font support is provided by FreeType.
  • Web-Kit This free and open source web browser engine offers all the features needed to show web content and speed up page loading.
  • A secure connection between a web server and a web browser can be created using SSL (SecureSockets Layer) technology.

Linux Kernel

The Android architecture's brain is the Linux Kernel. It oversees the management of all drivers, including those needed for the runtime, such as display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc.

Between the hardware of the device and the other elements of the android architecture, the Linux Kernel will offer an abstraction layer. It is in charge of managing things like memory, power, and gadgets.

The Linux kernel's characteristics include:

  • Security: Between the application and the system, the Linux kernel manages security.
  • Memory Management: It effectively manages the memory, giving us the freedom to create our apps.
  • Process management: It effectively manages processes and allots resources to processes as needed.
  • Network Stack: It manages network communication well.
  • Driver Model: It makes sure the software runs properly on the hardware and device makers who are in charge of integrating their drivers into the Linux build.

Native Libraries for C/C++

Many essential Android system parts and services, such ART and HAL, are created using native code and necessitate the use of C and C++ native libraries. Java framework APIs are made available by the Android platform so that programmes can access some of these native libraries' features. For instance, you can add support for drawing and modifying 2D and 3D graphics in your app by using the Java OpenGL API of the Android framework to access OpenGL ES.

You can use the Android NDK to directly access some of these native platform libraries from your native code if you're creating an app that needs C or C++ code.

Device Apps

A selection of essential apps for email, SMS messaging, calendars, web browsing, contacts, and other tasks are included with Android. The platform's built-in apps are just as valuable as any other apps the user can choose to instal. As a result, a third-party programme can take the user's place as their primary web browser, SMS client, or even keyboard (with some limitations, like the system's Settings app).

The system apps have two purposes: they serve as apps for users and they offer vital features that other programmes can access. For instance, if your app wants to send an SMS message to a certain recipient, you don't need to develop that feature yourself; instead, you may use any SMS app that is currently loaded.

Summary

Android Architecture gives developers a unified method for creating mobile applications that can run on any device that has Android OS loaded on it. It also enables the reuse of application components, eliminating the need for rebuilding. On numerous websites, Android source code is made available under open source licences.