Pages

Tuesday, September 11, 2012

Getting Started With Android Application Development

Android is one of the most famous mobile operating systems on earth.  Android OS is a Linux-based operating system created for the devices such as Smart Phones and Tablets. Android open source code was released by Google under the Apache License.

With the popularity of android OS, android application development has become more popular than ever. That's why I have thought about presenting you this article series about android application development. In this article series I will start from ground zero and hope to show you how deep is this rabbit hole goes. Before we write a single code, we have to set-up the environment as followed.
  • Install JDK
  • Install Android SDK
  • Setup Virtual Device (Emulator)
  • Install Eclipse
  • Installing the Android Plugin for Eclipse

Install JDK


We need Java Development Kit (JDK) in order to use the android SDK. So before we installing the android SDK, we have to download the JDK and install it. 
JRE is not enough for android so you have to install JDK 

Install Android SDK


For windows OS, Android SDK can be downloaded form following link.
After downloading, install the SDK. This will install android SDK Tools,
  • Android SDK Manager
  • Android AVD Manager
Now open SDK Manager as  Administrator ( right click →  Run as Administrator)


By using this, you can download SDK components for every android versions.
Just select the android version and download it. I recommend to download each and every android version.


Setup Virtual Device (Emulator)


Open AVD Manager as Administrator 

In this AVD Manger I have added three phones, but at first there will be no phones ere inserted. To setup an emulator you have to click the new button and fill the following dialog box.
In this dialog box, 
  • Name the phone as you wish.
  •  In target drop down list you will get the android versions that you installed before. Select one from it.
  • Give a size for SD Card of your Emulator. 
  • The snapshot property give you the capability of saving emulator states. You can use it to start the emulator quickly at next time and the emulator directly goes to the previous state, or the state that your emulator was before you close it.
  • In Skins, use the default skin
  • In hardware make sure that you have added followings by using 'new' dialog box
    • SD Card Support -yes
    • Keyboard lid support - yes
    • Keyboard support - yes
    • Audio Playback support -yes
Then create the emulator
you can start the emulator by using start button in AVD Manager
When I launched my emulator it didn't fit to my monitor so I have changed the Screen Size to 7, that means the emulator is 72% scaled. you can use it as default or scale it as you wish. 


Install Eclipse


Eclipse is the IDE that we are going to use for our android application development.
Download Eclipse
You can use any suitable release of eclipse on above link. But I prefer to use  Eclipse Classic.
After download install it.

Installing the Android Plugin for Eclipse


After the Installation of eclipse, we have to install ADT plugin.
This installation is done through Eclipse IDE. 

  • ADT plugin location https://dl-ssl.google.com/android/eclipse/
  • You can get the plugin location by using this link.
  • Then in Eclipse IDE 
    • Help  → Install New Software
    • By clicking add button you can get the add repository dialog box. you have to give the plugin location to it, then click OK.
    • After that it will show what are the developer tools that available to install, just check it all and click next and continue the installation process.
After the installation Eclipse tool bar will have following new icons.
Now we are ready to write our first android application 

But it will be another article..................

To be Continued.......