Wednesday, 29 August 2012

Intro to Android

Android is an open source software stack. The stack includes.
1. Operating System
 2.Middle ware.
 3. Key applications along with a set of APIs
all these helps to write mobile applications for smartphones.Basically,Android is an operating system based on Linux.  

A brief history

Android was developed by Andy Rubin, Rich Miner,Nick Sears and Chris white in 2003. It was then acquired by google inc in 2005.


Android Architecture



1.The Top most layer in Android architecture is Application Layer, which includes applications including Native apps , Developer apps and Third party apps.

2. Second layer is Application Framework layer,which provides classes to create Android Applications.

3. Third layer includes Libraries including media libraries , SGL and OpenGL for 2D and 3D graphics Respectively.SQLite for database support,SSL and Webkit for integrated web Browser and internet security.
Android Runtime is also embedded in third layer of architecture,which includes core libraries of android and Dalvik Virtual machine.
4. Fourth and the last layer of stack is Linux Kernel,which helps to handle services like hardware drivers,process and memory management,security etc.

Version of Android

There are eleven versions of Android till date
1.Android Beta.
2.Android 1.0

3. Android 1.1

4.Android 1.5 Cupcake.

5.Android 1.6 Donut.

6.Android 2.0/2.1 Eclair.

7.Android 2.2.x Froyo.

8.Android 2.3.x Ginger Bread.

9. Android 3.x Honeycomb.
10.Android 4.0.x Ice cream Sandwich.
11. Android 4.1.x Jelly Beans.





Requisites of Android Programming.....
First of all you must have a good knowledge of Java programming and a good hands on Eclipse.
The steps involved in starting Android Programming are............
1. Install java in your system.
2.Install Android SDK (Software Development kit)
(click here to install sdk)
3.Install Eclipse.
(click here to install Eclipse).
After downloading these software given above,set the path of Java in your system using following steps.

Go to program files in C drive of your system.
 you will find A jdk folder there.
1.Click on jdk folder - click on Bin folder you would found in jdk - copy the path written in address bar.
2.Now go to My computer folder - right click - properties - advanced - Environment variables - here you will find a header user variables for administrator ,click on new - a pop up will open - then give any variable  name and and paste the path you have copied before in variable value.
.

    Note - Eclipse will not start working untill you set the path of Java                       


How to work on Eclipse
Launch Eclipse on your system.

Now, after launching it, follow these instructions to set path of sdk in Eclipse.
1.click on window tab on menu bar- select Preferences - select Android -
you will find following window




click on Browse Button and browse the location where you have stored your sdk.
Now click ok. in this way you will be able to set path of sdk in eclipse.
The next thing is.. How to Make AVD
AVD is an acronym for Android Virtual Device.It is an Emulator , Which helps us to model an actual device by defining hardware and software options.
1.Click on Window tab on menu bar - select AVD manager you will get a window like this


click on new , a new window "Create new Android Virtual Device" will open , Give any name in Name Field for your AVD and select a Target,be it "Android 2.2 - API  Level 8".
A new AVD will form, now return to previous window "Android Virtual Device Manager", select AVD name and click Start - Launch.
In this way a new AVD will be launched.




Now follow these steps to name the project you are going to start.
1.click on File menu - new - android project- you will get a window like this


Give your application ,a name say "HelloWorld". The application name must start with uppercase letter. project name will automatically appear.
Edit package name as a combination of two identifiers separated by a period(.) ,say "hello.world". Package name must start with lowercase letter.
Now select an API level from Build SDK drop down menu. say, Android 2.2( API 8).
Now click next -  next and then Finish. An Android project will be created,it will appear on Project explorer in left hand side of Eclipse.

No comments:

Post a Comment