So, I want to keep the theory very minimal and just focus on implementing a variety of lightweight applications. People who know Java (or even C# or any OO language) should be in a comfort zone.
Alright let’s get the recipe out for developing android apps. Here is what you need.
- JDK 6 or above
- Eclipse IDE for JEE developers. You can download it from http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/R/eclipse-jee-indigo-win32.zip. Needless to say, extract it and open it after you have downloaded it.
- Android SDK. You can download it from http://dl.google.com/android/android-sdk_r16-windows.zip.
- Eclipse plugin for Android so that you can play with android applications from/within Eclipse.
- Open eclipse, go to Help->Install new software->Click ‘Add’->Type ADT in the Name textbox and https://dl-ssl.google.com/android/eclipse/ in the location textbox.
- Select the Developer Tools checkbox and click Next, again Next, Accept the licence agreements and finally hit Finish
- Now that’s going to take 10-15 minutes of your time depending on the speed of your connection. You may have to restart eclipse after this process.
- After restarting eclipse it may ask you to configure the android SDK. You can either choose to download a fresh copy of android SDK or give the location of Android SDK that you have downloaded earlier.
- Android SDK is a fundamental starter package. Say, you’re developing an application that will run on Android 3.0, then you need to have the Android 3.0 platform and tools installed. Go to Window->Android SDK Manager you will see the screen below. You can select Android 3.0 or anything that suits your requirement and install. This is a time consuming process.
- The application that you will build will be run in an android device, but what if you have a different version of android phone or sometimes don’t even have it(yes, it’s quite common!!!)? You can configure an android emulator or Android Virtual Device. Go to window->AVD Manager. You can create new Android virtual device(s) targeting any platform. So the applications can be run in any of these during development. I have configured a Virtual Device called ‘HoneyComb‘ for Android 3.0 platform as shown below.
There you go!!! We are all set to develop simple android apps.
Btw what is HoneyComb?
The structure of a Grails application looks like below.
The structure of a Sencha Touch MVC application is given below.
Take a close look at the file structure in both the cases. You will find that the conventions used in both Grails and Sencha Touch MVC are very similar, thereby improving the understanding of both the frameworks much better.