The closest I have been to development as far as Android is concerned is installing the Android SDK, and that was so I could call the Android OS emulator, and then install an Android app on a Windows platform for testing. When I was asked to do this topic, my first reaction was “Hell No! I am not a developer“, but thanks to power of positive thinking and enthusiasm, not forgetting the unlimited resource from a box called – The Internet.
Do take note that at the time of writing, I had not developed any Android app before, so I would outline basic procedures you would need to develop a good Android application. The logic and service behind the application all depends on the developer. One of the strengths of the Android platform compared to Apple’s iOS, for example, is that it has an open source platform, which makes it easier to produce your own applications and distribute them without waiting for a lengthy approval process.
You can set up your own Android app on your PC as long as you have the right software installed, and you can even take it for a test drive using an Android emulator so you can see what it will look like when it runs on a smartphone.
There are two techniques that you can use to produce Android applications on a PC:
-
The first is to use the Android Software Development Kit (SDK). This lets you write raw code and helps you get it working in the Android environment.
-
The second uses App Inventor, a Google Labs tool that’s still in beta.
This post would only make refernce to the Android Software Development Kit (SDK). Though the App Inventor is GUI driven and provides you with a simple dra-and-drop enviroment which makes is alot easier.
Pre-Requsite For Development Enviroment.
1. Java
Android apps are written in Java code, so you’ll need a Java development kit installed on your PC. You also need an integrated development environment (IDE) so you can write and test the code. You also need to get your computer ready for the Android SDK. Start by installing a Java Development Kit for your version of Windows.
You also need to install Eclipse IDE for Java developers. When you install Eclipse it will check for the JDK. It’s best to unzip Eclipse in the same directory as the JDK. If it can’t find the JDK it won’t install, but you can always move the required files to whatever directory the Eclipse installer is examining.
2. Android SDK
With Eclipse up and running, you can download the Android SDK. Extract it to a safe directory on your PC and make a note of where it is. Back in Eclipse you need to add the Android Development Tools. To do this, choose ‘Help > Install new software’. Next to ‘Work with’, enter https://dl-ssl.google.com/android/eclipse and click ‘Add’. In the pane below this, check ‘Development tools’ and click ‘Next’. Select ‘Android DDMS’ and ‘Android Development Tools’. Click ‘Next’, accept the terms and restart. You need to point the ADT plugin to where you extracted the Android SDK. In Eclipse choose ‘Window > Preferences > Android’. Next to ‘SDK location’ click ‘Browse’ and locate the folder with the SDK. Click ‘Apply’ and ‘OK’
Now that you’ve sorted out the development environment, you also need to get at least one version of the Android platform. You can do this in the Android SDK and AVD Manager, which you can launch in Eclipse if you’ve set your system up correctly.
Choose ‘Window > Android SDK and AVD Manager’ to open it, then select ‘Available packages’ and tick the box next to ‘https://dl-ssl.google.com/android/repository/repository.xml’.
After a brief scan of the repository, you’ll see the available components. Tick those that you want to install and clear the rest. The most important package to install is the latest version of the Android platform. You’ll only need older ones if you plan to release your app and need to test it in a range of different versions. At this stage you can also clear the samples, Google APIs and USB driver. If you need any of these later, you can always go back and install them.
Click ‘Install selected’ and wait for the components to download. Verify and accept the new components if prompted and they will be added to your existing Android SDK folders.
3. Create Virtual Device for testing.
For you to be able to test you applicaiton you need to create an Android Emulator using the Android virtual Device. (AVD). Having downloaded a version of Android, set up an Android Virtual Device (AVD) to run the computer. You can do this in the Android SDK and AVD Manager. Choose ‘Window > Android SDK and AVD manager’ and select ‘Virtual devices’. Click ‘New’ and provide a name for your new device. Select the Android platform that you want to use as the target. Click ‘Create AVD’.
If you want to test your application under different versions of Android, you’ll need to create a new virtual device for each version of the platform. You can also specify other parameters here, including the presence and size of an SD card. It’s also possible to select a file to use as a virtual SD card.
You can opt to use the built-in skin (recommended) or specify the resolution that you want to use. Under ‘Hardware’, click ‘New’ and select a device if you want to add more virtual hardware. For a simple AVD, you’ll generally be fine sticking with the default options. You can now close the Android SDK and AVD Manager.
To launch the Android Device click on the start button in the window above having higlighted the AVD name. To achieve this you must have downloaded a version of Android and set up an Android Virtual Device (AVD) to run the computer [You can do this in the Android SDK and AVD Manager. Choose ‘Window > Android SDK and AVD manager’ and select ‘Virtual devices’. Click ‘New’ and provide a name for your new device. Select the Android platform that you want to use as the target. Click ‘Create AVD’. ]
If you want to test your application under different versions of Android, you’ll need to create a new virtual device for each version of the platform. You can also specify other parameters here, including the presence and size of an SD card. It’s also possible to select a file to use as a virtual SD card.