Saturday 15 February 2014

Android Development Getting Started

My first official blog in developing software will take the time to provide readers with the necessary software that will be used to create apps for Android development. Though I am more versed in Windows Phone development as I have only started development for Android a few weeks ago, I feel more people would prefer to start with Android devices. Android devices have become the most sold devices in the phone and tablet market even surpassing rivals Apple, there are a number of reasons behind this which I will go into at a later date but for the moment we will focus on how you can start creating you're own Android applications.

The software I have grown to use throughout the duration of this course is Eclipse, this is an open source piece of software so anyone can download, install and create their first application in just a few hours. Eclipse does not originally come with the necessary tools to create Android apps but there is an open source bundle which comes with an Android Emulator (more on this later) and the ability to create Android project. If you already have Eclipse installed you can download the necessary software for Android development but I found this to be awkward at times so I suggest deleting and downloading the bundle which includes Eclipse.

Just follow the link provided and click the download button:
http://developer.android.com/sdk/index.html?utm_source=weibolife






















Note: Pay close attention to the System Requirements, anything from windows XP to windows 8/8.1 should not be a problem.

The next step is to run and download the required API packages for the version of Android you want to develop for I recommend downloading the latest API 19 (KITKAT) as most Android devices incorporate this version in their system and it is beneficial for the apps you develop to be compatible on most devices.

Click the SDK Manager:

Once the SDK Manager appears you will be faced with numerous check-boxes and different API versions to download. Do not panic I will tell you exactly which ones to download.

The easiest thing to do is to click any check-box with "19" in the name including "19.0.1" the next image will show which check-boxes you need to install. There is however one more package to download the "Google USB Driver" package located near the bottom.





Note: The number of install packages will be greater than mine, due to the fact I have already installed the packages.

 Accept the licence and install:


Note: Installing these packages may take a while go and grab a coffee!

The next step we will create an emulator in Eclipse. An emulator is basically a digital representation of an Android device, this is how we will run our applications before we distribute the app. The emulator gives the developer a sense of how their app will look and feel on the intended Android device.

The first step will to run Eclipse, the location of Eclipse is in the folder marked Eclipse, this folder is located where we found the SDK Manager. Once in the folder click the Eclipse icon. 


Once Eclipse is up and running you will want to click the "Android Virtual Device Manager" located on the top tool-bar of Eclipse.


On the next screen click the "New" button and we can start to specify the type of Android emulator device we want to run on our PCs. The specifications I will be using are a 5.1 WGVA device running API 19.
Copy the specifications in the below image to create an emulator, the name does not matter but I like to keep the naming convention to the device I am currently using.


When you click the "OK" button the once empty "Android Virtual Device Manager" will be populated with the emulator we have created. The next step is to select and start the emulator.


Almost Done! The last window before the emulator starts running is to launch the emulator. The emulator at first takes a long time to kick in, but fortunately the more times you run the emulator the faster it becomes. This is all to do with the snapshot feature in the following window. This saves the state of the emulator in a big file to be called upon when the emulator is started again. Be patient at first but if you experience any problems with the emulator close the emulator and start it back up however this time to un-check the "Launch from snapshot" option and launch it again. Once again I urge you to be patient. 

Finally! The emulator should be up and running, play around with the emulator for a little bit and get a feel for it before we get on to actually developing apps for Android. The emulator will look like the following images. If you close the emulator and run it again, check the "Launch from snapshot" option and it should start up significantly quicker. Congratulations we are well on our way!




1 comment:

  1. Very Informative, Helped me with which packages to install on the SDK Manager which really helped when it came down to trying to develop for the new versions of the Android OS.

    ReplyDelete