Monday, 23 March 2015

Android Architecure

Overview


Android is a software package and Linux based operating system for mobile devices such as tablet computers and smartphones.

Android operating system is a stack of software components which is roughly divided into four main layers as shown below in the architecture diagram.


Android software stack

Linux kernel and a collection of C/C++ libraries are exposed through an
application framework which manages and provides the services for the application at run time.



Understand the Architecture layers in brief.


1. Application Layer.




Application Layer the topmost layer of android architecture contains all               android applications, the native applications provided with the particular Android implementation (for example web browser, contacts and email applications etc) and the third party applications installed by the user after purchasing the device.



2. Application Framework.



Android applications directly interacts with application framework. Application framework includes Android API's such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers. It provides a lot of classes and interfaces for android application development. It also provides a generic abstraction for hardware access and manages the user interface and application resources.

Let's understand what actually framework API's do.

Activity Manager
    Used to manage complete activity life cycle of applications

Content Providers 
Used to manage the data sharing between two applications                                
Telephony Manager
    Used to manages all voice calls

Location Manager
    Used to manage the Locations obtained using GPS or cell tower                      
Resource Manager
    Used to manage the different types of resources used in android app    

Views                
    Used to construct the user interfaces for activities.

Notification Manager  
    Used to tell the user that something has happened in the background.



3. Libraries and Android run time


Libraries:-
It provides the different libraries useful for well functioning of android operating system. Libraries are written in java and C/C++ languages build specific for android operating system.


SQLite
 It is used to access data published by content providers and includes SQLite database management classes

SSL
 It is used to provide internet security

OpenGL
 It is used to provide Java interface to the OpenGL/ES 3D graphics rendering    API.

Media framework
 It is used to provides different media codecs which allow the recording and  playback of different media formats

WebKit
 It is the browser engine used to display internet content or HTML content

FreeType
 It is used for font support

Android run time.
 In android run time, there are core libraries and DVM (Dalvik Virtual Machine)  which is responsible to run android application. DVM is like JVM but it is  optimized for mobile devices. It consumes less memory and provides fast  performance.

Linux Kernel

Linux Kernel provides the basic system functionality such as process management, memory management and device management. Linux kernel also provides array of device drivers which make our task easier while interfacing the android with peripheral devices