Monday, February 3, 2014

What is Android Architecture?

By Admin   Posted at  4:33 PM   Programming Languages 11 comments

                                  Android Architecture

Hi folks,
In our previous Android Tutorials, we have discussed quite a few concepts of Android development.
We have successfully set up android development environment in our last tutorial; I think that it is time to start with Android Architecture before starting basic android programing we must be aware of android architecture and layer's in android stack .
Androidfulcrum.blogspot.in >> Android Tutorials>> Android Architecture

So lets take a take a quick walk through of the Android Architecture.

Android Architecture: Layers in the Android Stack

The Android stack, as the guys over at Google call it, has a number of layers, and each layer groups together several programs. In this tutorial I’ll walk you through the various layers in Android stack and the functions they are responsible for.

Following are the different layers in the Android stack:
  1. Linux Kernel Layer
  2. Libraries Layer
  3. Application Framework Layer
  4. Applications layer


Kernel Layer:

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.

Android Architecture: Linux Kernel

At the bottom of the Android stack is the Linux Kernel. 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
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.

Libraries Layer

Android architecture: Android libraries

The next layer in the Android architecture includes Android’s native libraries. 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.
This layer 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.

Some of the important native libraries include the following:

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.

Media framework: Media framework provides different media codecs allowing the recording and playback of different media formats.

SQLite: SQLite is the database engine used in android for data storage purposes.

WebKit: It is the browser engine used to display HTML content.

OpenGL & SGL: Used to render 2D or 3D graphics content to the screen.

Free Type: Font Rendering.

Open SSL

Android Runtime

Android Runtime consists of Dalvik Virtual machine and Core Java libraries.
Android architecture: Android runtime layer

Dalvik Virtual Machine
It is a type of JVM used in android devices to run apps and is optimized for low processing power and low memory environments. Unlike the JVM, the Dalvik Virtual Machine doesn’t run .class files, instead it runs .dex files. .dex files are built from .class file at the time of compilation and provides hifger efficiency in low resource environments. The Dalvik VM allows multiple instance of Virtual machine to be created simultaneously providing security, isolation, memory management and threading support. It is developed by Dan Bornstein of Google.
Core Java Libraries
These are different from Java SE and Java ME libraries. However these libraries provides most of the functionalities defined in the Java SE libraries.

Application Framework Layer

Applications framework layer
Android applications directly interact with these blocks of the Android architecture. These programs manage the basic functions of phone like resource management, voice call management etc.

Important blocks of Application framework are:

Activity Manager: Manages the activity life cycle of applications.

Content Providers: Manage the data sharing between applications.

Telephony Manager: Manages all voice calls. We use telephony manager if we want to access voice calls in our application.

Location Manager: Location management, using GPS or cell tower.

Resource Manager: Manage the various types of resources we use in our Application.

Application Layer

Applications layer: Android architecture
The applications is 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.and this is where our applications are gonna fit. Several standard applications comes pre-installed with every device, such as:
  • SMS client app
  • Dialer
  • Web browser
  • Contact manager
  • Games etc.
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.
I hope you are clear with the basic Android architecture now! So, in next tutorial we will see what are the android app components. So, Stay tuned for more android development tutorials.

This tutorial has been written with an aim to teach you and explore a little bit about what is android architecture. #Some of Stats/Info mentioned in this post are taken from Wikipedia. They are subjected to changes as android technology is growing very fast.

About the Author

Harshal B Kolambe [aka] " HBK || XyberLord || Harschell " Bachelor of Engineering in Computers, Game Developer, Android Application Developer and Security Analyst, ( Certified Ethical Hacker ).
View all posts by: HBK

11 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.
    Data Science Training in ChennaiKK Nagar | Data Science Course in Chennai
    Python Course in Chennai KK Nagar | Python Training Course Institutes in Chennai
    RPA Training in Chennai KK Nagar | RPA Training in Chennai

    ReplyDelete
  3. Excellent post, it will be definitely helpful for many people. Keep posting more like this.. oracle training in chennai

    ReplyDelete
  4. Really wonderful blog! Thanks for taking your valuable time to share this with us. Keep us updated with more such blogs.

    Best IAS Coaching in Mumbai

    ReplyDelete
  5. Great Post. Very informative. Keep Sharing!!

    Apply Now for Android Training in Noida

    For more details about the course fee, duration, classes, certification, and placement call our expert at 70-70-90-50-90

    ReplyDelete

Back to top ↑
Connect with Us

WhatsApp Share

What they says

one of the best mobile technology blog
one of the best mobile technology blog
one of the best mobile technology blog
one of the best mobile technology blog

Licencing

© 2013 Andropedia : The Android Fulcrum ™. Distributed By Blogger Themes | WP Mythemeshop Converted by Bloggertheme9
Blogger templates. Proudly Powered by Blogger.