Introduction to Android

Introduction 

 
Android is an open-source operating system compatible only with handheld devices like cellular mobiles and tablet computers. Its base is a Linux kernel, the highly optimized version of Linux kernel is used as a base in Android. Android becomes very popular because of its more reliable user interface like it enables users to Tap, Swipe, Pinch, Reverse Pinch and so on. Nowadays Android not only is used in tablets computers and mobile phones but also in cars, watches, televisions and so on.
 

Setting up Environment 

 
The basic entities needed for Android Development are as follows.
 
Install the JDK 7th version or higher then install the ADT Eclipse bundle that contains the SDK, Eclipse IDE, SDK Manager tool and other plugins that are builtin. Now you are ready to make an Android application. Please follow certain points for successful creation of the application.
 
Be sure to use the latest SDK and ADT plugins.
 
Step 1
 
Click on File > New > Android Project.
 
new
 
Now a tab appears asks for the name of the application and the project as well.
 
Step 2
 
Name your application.
 
namingapplication
 
Write down the application name, myFirstApp; this name will appear in Google's Play Store. You can name the application depending on your choice. The minimum required SDK must be the lowest version so that your application must support or be compatible with the lowest version of Android and of course the current version of Android. You can select themes as you choose; here we are using the simple theme.
 
Step 3
 
Configure your project as in the following:
 
configureproject
 
Create the project in a specific location of your computer; it is up to you, such as shown in the preceding figure. The other things remain untouched and press the Next button.
 
Step 4
 
Specify the Launching Android Icon as in the following:
 
launchicon
 
Here you can configure an Android icon of an size with text and clipart and press Next.
 
Step 5
 
Create the activity as in the following:
 
blankactivity
 
Just try to create a blank activity and press the Next button.
 
Step 6
 
The following shows the hello world screen.
 
helloworlds
 
Here you can see that a hello world screen appears. Two fragments can be seen on the upper part of the screen, MainActivity.java that contains the code for hello world and another activity_main.xml that contains the activity. We can add buttons and other things from the palette as shown on the left.
 

Architecture of Android OS

 
Android is an open-source operating system that is compatible only with Handheld devices like cellular mobiles and Tablet computers. Its base is a Linux kernel, a highly optimized version of the Linux kernel is used as the base in Android. Android becomes very popular because of its more reliable user interface. For example it enables the user to Tap, Swipe, Pinch, Reverse Pinch and so on. Nowadays Android is not only used in tablets computers and mobile phones but also in cars, watches, televisions and so on.
 
We have had an introduction to and the corresponding installation procedure. Now in this article, we will also learn the Architecture of the Android operating system that is a very important part of the application development. Before starting the development one should understand the architecture of the Android operating system.
 
linuxenhanced image
 Figure: Architecture of Android OS
 
There are mainly four layers in this Architecture, every layer has its functionalities that are discussed below. However, there is a layer combination of Libraries and Android Runtime that is the most important part and provides Android programs to be executed.
  • Base Layer: Linux Kernel
     
    This is the base layer of the Android operating system that contains all the driver program types, for example camera driver, Wi-Fi driver program and all audio and video driver programs. The optimized version of the Linux kernel is used in the Android OS because of memory limitations since these types of operating systems run on handheld devices, for example, cellular devices, tablet computers and so on.
     
  • Second Layer: Libraries + Android Runtime
     
    On a level above the kernel, there is a set of libraries including an open-source web browser engine, web kits, well-known library libc and Sqlite database that is a useful repository for the storage and sharing of application data. The SSL library is responsible for internet security and encryption of data before the communication starts and the other library is for audio and video purposes.
     
    Android Runtime:
     
    • Dalvik Virtual Machine
    • Core Libraries
    In the Runtime section, a key component is called the Dalvik virtual machine that is a kind of JVM (Java Virtual Machine) specially designed for Android optimization. DVM uses the Linux core features like memory management and multithreading that are intrinsic in the Java language. DVM enables all the applications to run in its own process with its own instance.
     
    First, the Java source is converted to a .class file by the Java compiler (javac) and then the .class file ia converted into a .Dex using the .dx (Android compiler) that produces a highly optimized code.
     
    The Core libraries enable Android application developers to write Android applications while using the standard Java programming language. The Core libraries contain the core APIs:
     
    • Written in Java
    • Data structure
    • File Access
    • Network Access and
    • Graphics and so on. 
       
  • Third Layer: Application Framework
     
    The application framework layer provides many higher-level services to applications in the form of Java classes. Application developers are allowed to use these services in their applications. Some of the services are Activity Manager, Package Manager, Windows Manager, Notification Manager.
     
    All the preceding mentioned services manage resources and their own activities.
     
  • Last Layer: Applications
     
    This is the top most layer from the beginning and the last from the end layer. It enables users to install apps as per their choice and all other builtin apps could be used by this interface. Whatever the user sees in the home screen of the mobile phone that is Android based is generally called the application layer.

Conclusion

 
This article is just to convince beginners how to set up an environment for Android development and the basic information about the sections and layers of the Android operating system.


Similar Articles