Android Architecture: Libraries, Linux Kernal, Application
Android Architecture is divided into five sections and four main layers namely; Application, Libraries, Linux kernal, Android Runtime, and Application Framework.
In previous lessons, we became familiar with the Android Studio development environment and we created a simple test project to analyze some of its aspects. Before going into more advanced concepts, however, it is worth pausing for a moment on some more abstract concepts that are the basis for the development of applications for Android.
Android is a system that includes an operating system, a run-time environment, middleware, services, libraries and of course applications. Android architecture can be represented, as seen in the first lesson of this guide, in the following way
Let’s analyze the fundamental elements of this Android Architecture.
LINUX KERNEL – Android Architecture
The Linux kernel is located at the bottom of the Android software structure (which is technically a stack). This level contains all the low-level drivers for the various hardware components ( such as display, camera, audio, keyboard and all the fundamental components of a device) of an Android device. It provides a level of abstraction between the hardware of the devices and the upper levels of Android Architecture.
At the same level as libraries, the runtime provides a set of basic libraries that allow developers to implement Android applications using the Java programming language. This section also includes the Dalvik virtual machine, which allows each application to be executed in its own process, with its own instance of the virtual machine.
An Android application is compiled in an intermediate bytecode format, called DEX. When subsequently loaded onto a device, the Android Runtime uses a compilation process called AOT (Ahead-of-Time) to translate the bytecode into the native instruction format required by the device’s processor. This format is known as ELF (Executable and Linkable Format). Whenever the application is subsequently launched, the ELF is already running, resulting in faster application speed and longer battery life for the device. This approach differs from the JIT (Just-in-Time) compilation, used in previous versions of Android, in which the bytecode was compiled into a new virtual machine each time.
In addition to the standard Java libraries, the Android development environment also includes others called Android Libraries (a set of Java libraries specific to Android). It contains all the code that provides the main features of the Android operating system. For example, the WebKit library provides functionality for web browsing through the device browser.
The most important ones Android Libraries are:
android.app – Provides access to the application model and forms the basis of all Android applications
android.content – Facilitates access to content, allowing communication between applications and components
android.database – Allows access to data published by a content provider and includes classes for SQLite database management
android.graphics – A two-dimensional graphics API for rendering colors, points, canvases and other graphic elements
android.hardware – API for access to hardware elements such as accelerometer and sensors
android.os – Provides functionality for using basic system services
android.media – Provides classes to enable audio and video playback
There are many other libraries to learn more about which you can consult the official Android documentation.
The Application Framework is a set of services that constitutes the environment in which Android applications are run. It exposes the potential of the Android operating system to application developers so that they can use them in their own applications.
Application Framework consists of the following components:
Activity Manager – Controls various aspects of an application’s life cycle and activity stack
Content Providers – Allows applications to publish and share data with other applications
Resource Manager – Allows access to resources such as strings, settings, and layouts
Notifications Manager – Allows applications to let users see alarms and notifications
View System – A set of components used to create user interfaces
Package Manager – System through which applications can find information on other applications currently installed on a device
Telephony Manager – Provides information to applications about available telephone services
Location Manager – Provides access to location services by applications
Finally, Applications are on top of the Android architecture. They include both native applications of the Android version in use on the device and third-party applications installed by the user on the device.
We are sorry that this lesson was not useful for you!
Let us improve this lesson!
Tell us how we can improve this lesson?