Android
Architecture:
Android architecture is nothing but collection of layers, which are
useful to develop android application in easy way.
Following are the different layers in the Android stack:
1. Linux Kernel Layer
2. Native Libraries Layer
3. Application Framework Layer
4. Applications layer
Each and every layer of android is important we will see in
details of each layer.
Kernel Layer:
At the bottom of the layer is Kernel(Linux) which
includes sub components has shown in the figure.It never really interacts with the users and
developers, but is at the heart of the whole system. Its importance stems from
the fact that it provides the following functions in the Android system.
- Hardware
Abstraction
- Memory
Management Programs
- Security
Settings
- Power
Management Software
- Other
Hardware Drivers (Drivers are programs that control hardware devices.)
- Support
for Shared Libraries
- Network
Stack.
Linux Kernel The basic
layer is the Linux kernel. The whole Android OS is built on top of the Linux
2.6 Kernel with some further architectural changes made by Google. It is this Linux that interacts with the
hardware and contains all the essential hardware drivers. Drivers are programs
that control and communicate with the hardware. For example, consider the
Bluetooth function. All devices has a Bluetooth hardware in it. Therefore the
kernel must include a Bluetooth driver to communicate with the Bluetooth
hardware.
The Linux kernel also acts as an abstraction layer between the
hardware and other software layers. Android uses the Linux for all its core
functionality such as Memory management, process management, networking,
security settings etc. As the Android is built on a most popular and proven
foundation, it made the porting of Android to variety of hardware, a relatively
painless task.
Different Kernel versions
Native Libraries Layer:
The next layer is the Android’s native libraries. It is this layer that enables the device to handle different types of data. These libraries are written in c or c++ language and are specific for a particular hardware.
Libraries carry a set of instructions to guide
the device in handling different types of data. For instance, the playback and
recording of various audio and video formats is guided by the Media Framework
Library.
Open
Source Libraries:
Surface Manager: It is used for compositing window manager with off-screen buffering. Off-screen buffering means you cant directly draw into the screen, but your drawings go to the off- screen buffer. There it is combined with other drawings and form the final screen the user will see. This off screen buffer is the reason behind the transparency of windows.
SGL: 2D Graphics
Open GL|ES: Used to render 2D or 3D graphics content to the screen Android Runtime Android Runtime consists of Dalvik Virtual machine and Core Java libraries.
Media Framework: Supports playbacks and recording of various audio, video and picture formats.Media framework provides different media codecs allowing the recording and playback of different media formats.
Free Type: Font Renderin
WebKit: It is the browser engine used to display HTML content
libc (System C libraries
SQLite: SQLite is the database engine used in android for data storage purposes.
Surface Manager: It is used for compositing window manager with off-screen buffering. Off-screen buffering means you cant directly draw into the screen, but your drawings go to the off- screen buffer. There it is combined with other drawings and form the final screen the user will see. This off screen buffer is the reason behind the transparency of windows.
SGL: 2D Graphics
Open GL|ES:
Media Framework: Supports playbacks and recording of various audio, video and picture formats.Media framework provides different media codecs allowing the recording and playback of different media formats.
Free Type: Font Renderin
WebKit:
libc (System C libraries
SQLite:
Located on the
same level as the libraries layer, the Android runtime layer includes a set of
core Java libraries as well. Android application programmers build their apps
using the Java programming language. It also includes the Dalvik Virtual
Machine.
Android Runtime:
Android Runtime:
1. It is third component of the android architecture and
placed in second layer from bottom
2. It provides most important part of android called Dalvik
Virtual Machine.
3. Dalvik Virtual Machin is similar to JVM but only
difference is that it is designed and optimized for Android.
4. Dalvik Virtual Machin uses core functions of Linux such
as memory management and multithreading and enables each android app to run its
own process.
Application Framework Layer:
These are the blocks that our applications directly interacts with. These progreams manage the basic funtions of phone like resource management, voice call managements etc. As a develper, you just consider these are some basic tools with which we are building our applications.
Important blocks of application framework are:
Activity Manager: Manage the activity life cycle of applications.
Telephony Manage: Manages all voice calls. We use telephony manager if we want to access voice calls in our application.
Content Provider: Manage the data sharing between applications.
Location Manager: Location Management, using GPS or Cell Tower.
Resource Manager: Manage various types of resources we use in our application
The applications are at the topmost layer of the Android stack. An average user of the Android device would mostly interact with this layer (for basic functions, such as making phone calls, accessing the Web browser etc.). The layers further down are accessed mostly by developers, programmers and the likes.
Several standard applications come installed
with every device, such as:
2 Dialer
3 Web
browser
4 Contact manager
As a developer we are able to write an app which replace
any existing system app. That is, you are not limited in accessing any
particular feature.You are practically limitless and can whatever you want to
do with the android (as long as the users of your app permits it). Thus Android
is opening endless opportunities to the developer.
Finally It Work Like The
Below:
No comments:
Post a Comment