Android architecture is a software stack of components to support mobile device needs. The software stack of android consists of a Linux Kernel and collection of c/c++ libraries that are exposed through an application framework services, runtime, and application.
Following are the main components of android architecture:
From the above components, the Linux Kernel is the main component that provides its operating system functions to mobile and Dalvik Virtual Machine (DVM) which is responsible for running a mobile application.
Following is the android architecture with different components.
The topmost layer of the android architecture stack consists of applications called apps, which are programs that users directly interact with. It consists of the native and third-party applications like contacts, email, music, gallery, clock, games, etc, whatever we will build those will be installed on this layer only. The applications use the android framework which uses android runtime and libraries.
There are two types of apps:
The application framework provides classes that are used to create android applications. A generic abstraction is also provided by the application framework for hardware access and it manages the user interface and application resources. It provides the services through which we can create a particular class and make that class helpful for application development.
It consists of different services like telephony service, notification manager, location services, NFC service, view system, etc. which can be used for application development as per our requirements.
Android runtime environment is one of the important parts of android rather than an internal part and it contains components like core libraries and the Dalvik virtual machine. The android run time is nothing but the engine that powers our applications along with the libraries and it forms the basis for the application framework.
Dalvik Virtual Machine (DVM) is a register-based virtual machine like Java Virtual Machine (JVM). It is specially designed and optimized for android to ensure that a device can run multiple instances efficiently. It depends on the Linux kernel for threading and low-level memory management. The core libraries of android runtime will enable us to implement android applications using standard JAVA programming language.
The platform libraries include different C/C++ core libraries and Java-based libraries such as SSL, Graphics, SQLite, Webkit, Media, Surface Manager, OpenGL, etc. to provide support for android development.
The following are the details of some core android libraries available:
Linux kernel is the heart of the android architecture and it is the bottom layer. The function of Linux kernel is to manage all the drivers such as display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc. that are required for the android device during the runtime.
The abstraction layer is provided by the Linux kernel between the device hardware and the remainder of the stack and it is responsible for memory management, power management, device management, resource access, etc.