August 28, 2010

Requirements for Android

So, lets start what are the requirements needed for Android application development.
1) Eclipse IDE: This is the IDE where Android apps will be written and compiled in an Emulator. Emulator is the virtual android device where the application code will be made to run/executed just as it could be in a real Mobile.But, in Eclipse Android Emulator is not provided, it just compiles the code and if found any errors it give a red cross. So, we must download Emulator to run the application.Eclipse by default doesn’t know anything about Android and so Google provided some Android Libraries(along with its own Tools) which can be included into Eclipse as an Environment to execute the code.Interestingly Google provides these Android libraries as Android SDK(Software Development KIT). This kit also includes the Emulator :) All in one shot..get Eclipse Galileo/Helios any version  at
2) Android SDK: As I said this SDK is the thing which has all the libraries needed for Android execution and also it has the Emulator to run the app as it runs in normal Android phone.Get Android SDK at the site given, So now we have all the requirements needed Eclipse and Android SDK but as I said how does Eclipse can get all these SDK libraries in to it?? We need to link this SDK to Eclipse to start A new Android Project.
3) This linking is done in Eclipse by its plug-ins.Plug-in is the thing just as a wire with a plug. Just like when we need to run a TV first We need to plug-in the TV cable to switchboard.Same as that We need a eclipse plug-in to show new perspective of compiling environment simply call it as Android Environment.This plug-in is called Android Development Tool(ADT). After Installing Eclipse goto Help –> Install new Software and type in - Work with  “” . Next just include all tools and complete the installation!!
4) Unzip the Android SDK to any drive. Open Eclipse then window –> preferences –> Android ! Here browse the SDK location to the unzipped Android SDK folder. After this is done Eclipse loads all the libraries and must add a perspective called DDMS and also When U open new project there must be ‘New Android Project’ to select . If DDMS or ‘New Android Project’ doesn’t appear then linking Android to Eclipse failed, repeat again.
5) So after making a ‘New Android Project’ and writing all the code where can we compile, we need an Emulator and to our interest Emulator is in SDK and We had linked this SDK to Eclipse. Simple We must be able to launch an Emulator from Eclipse to run the Android Window –> Android SDK and AVD manager, before Going in this section U need to know some details about Android.
Google bought Android company in 2002 and then they started this Android SDK version 1.0 in 2008. From here things went far beyond anyone could expect.Google started initiative of OHA(Open Handset Alliance) and manufacturers must be join this OHA to produce Android phones. Now there are more than 100 Mobile manufacturers in this OHA from Nokia, Samsung, Sony, LG, Dell, Kyocera, HTC etc…So things were like a competition, till 2009 only 2-3 Android phones(including Google nexus) were in the market but in early 2010 there was sudden splurge of Android phones and  Android SDK versions creating dilemma for Developers. From 2008 to 2010 different versions of Android SDK were released, from 1.0 –> 1.5 –> 1.6 –> 2.0 –> 2.1 –>2.2(mid of 2010)  were rolled out. The need to make such versions shows the way Android Source code evolved.So, in our SDK we will be having all these emulators from 1.0 to the latest one. Emulator is an AVD(Android Virtual Device).There are many manufacturers still developing Android Apps in SDK 1.5 and 1.6 versions like Dell with their mobile Aero.
So, when We need to compile the Android App we need an emulator and there are many versions of Emulator from 1.0 to 2.2(2.2 is the latest one). When window –> Android SDK and AVD manager is opened u’ll see this dilemma.Write a name of your choice select a Emulator version which is the latest one.For a normal developer 50 MB of SD card is more than sufficient.
Skin is the thing which differs lot. There are many Android devices in the market ranging from mobiles to tablets. When developing apps for tablets we must have a emulator which is  quite relevant and appropriate to the real Device. There skin comes to picture, tablets have high resolution compared to normal Mobiles. To make such an Emulator just click resolution and type the numbers like 800 X 600 to get the screen equivalent to such resolution tablet.For normal mobile app development just use built-in skin. click create, then we get an new AVD where we can compile the Android apps. :)

so we have all the needed things to compile Android apps and now just create new android project fill up the project name with “Hello World”, application name with “Hello Android”, package name with “”, sdk version to the appropriate version of AVD U just created and then Create Activity to “Hello Android”. now just right-click the project name in the left-side project explorer, wait a couple of minutes to send this project code to emulator. Then U can see “Hello World”  on the Emulator screen.Don’t get stumbled when U see different types of  files in your project.

Hope U enjoyed this post. Pls ask questions if u get any doubts!!

No comments:

Post a Comment