Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Android architecture


May 21, 2021 Android


Table of contents


Android architecture

The Android operating system is a stack of software components that can be roughly divided into five parts and four main layers in the schema diagram.

Android architecture


Linux kernel

At the bottom of all layers is Linux - including Linux 3.6 with approximately 115 patches. I t provides basic system functions such as process management, memory management, and device management (e.g. camera, keyboard, monitor). At the same time, the kernel handles all the work Linux excels at, such as networking and a large number of device drivers, thus avoiding the inconvenience of being compatible with a large number of peripheral hardware interfaces.


The library

Above the Linux kernel layer is a collection of libraries, including the open source web browser engine Webkit, the well-known libc library, the SQLite database for warehouse storage and application data sharing, the library for playing, recording audio and video, the SSL library for network security, and so on.


Android library

This category includes Java-based libraries developed specifically for Android. E xamples of this category of libraries include application framework libraries, such as user interface building, drawing, and database access. The core Android libraries available to some Android developers are summarized below:

  • android.app - Providing access to the app model is the cornerstone of all Android apps.
  • android.content - facilitates content access, publishing, messaging between applications, between application components.
  • android.database - Used to access data published by content providers, including SQLite database management classes.
  • android.opengl - OpenGL ES 3D picture rendering API's Java interface.
  • android.os - Provides application access to labeled operating system services, including messages, system services, and inter-process communication.
  • android.text - Render and manipulate text on the device display.
  • android.view - the basic building block of the application user interface.
  • android.widget - A rich collection of preset user interface components including buttons, labels, lists, layout management, turn buttons, etc.
  • android.webkit - A collection of classes that allow built-in web browsing capabilities for applications.

Having seen the Java-based core libraries within the Android runtime, it's time to look at the C/C?-based libraries in the Android software stack.


Android runtime

This is the third part of the architecture, the bottom-up second layer. This section provides key components called Dalvik virtual machines, similar to Java virtual machines, but specifically designed and optimized for Android.

Dalvik virtual machines make it possible to use Linux core features such as memory management and multithreaded in Java. Dalvik virtual machines enable each Android application to run on its own independent virtual machine process.

The Android runtime also provides a core set of libraries for Android app developers to write Android apps in the standard Java language.


Apply the framework

The application framework layer provides many advanced services to applications in the form of Java classes. Application developers are allowed to use these services in their apps.

  • Activity Manager - Controls all aspects of the application lifecycle and activity stack.
  • Content Provider - Allows data to be published and shared between applications.
  • Explorer - Provides access to non-code embedded resources such as strings, color settings, and user interface layouts.
  • Notification Manager - Allows the application to display a dialog box or notify the user.
  • View System - A scalable collection of views used to create an application user interface.

Application

There are all the Android apps at the top. T he application you write will also be installed at this level. These applications include contacts, browsers, games, etc.