Hello friends!!! I am planning to start a new series of Android development. Hope this will help you to learn very first. Yes. Android is the most popular operating system in the world in terms of market share. Android doesn’t mean only phone. It means almost any device like TV, robot, freeze, microwave etc. I have developed an android application to communicate this this kind of device called SmartProbe and the web cloud. So, definitely it will be worth learning of Android programming. For information about theaward winning website design company, visit localseohelp.com for more info. Excited??? Me too. Now lets start.
In this starting tutorial, we will develop a very very simple HelloAndroid application and learn the mighty Eclipse and the SDK. I will mostly concentrate on code and less likely explain terms like SDK which means Software Development Kit. If you interested to learn more about these terms, just Google it. You will get all details.
We need to know what we have and what we need. The installation process is little bit time consuming. According to Google –
So, make sure you have JDK 6 installed in your operating system.
Tips: For windows user, make sure you have set you’re the PATH system variable. How can you do it!!! Go to https://www.java.com/en/download/help/path.xml
I hope, you have already installed JDK 6. Now what??? Good question. Go to http://developer.android.com/sdk/index.html
And download you’re ADT(Application Development Tools) based on your operating system. They call it ADT that’s why I call it ADT. It may take some time. So keep passions. After download, extract it, you will have two folders inside ADT bundle, like –
We will mostly work with eclipse. So, it would be a good idea if you make a shortcut of “Eclipse” on your desktop.
Now double click on the Eclipse icon. It will run Eclipse IDE window. Like –
Now we need to set our AVD (Android Virtual Device), so that we can run our aps in the emulator. AVDs are exact copy of your android phone, however it has some limitations. So, go to Window > Android SDK Manager. Here we will install our different Android versions for our AVD.
Tips: Don’t think about to install everything at once. It is huge.
I will show you the minimum requirement for our AVD. I have only installed Android 4.0 and Android 4.3 versions. You can install others when you will get time. It also takes a while.
After complete, close this window and go to Window > Android Virtual Device Manager. You will get a blank list. This is because; you don’t have any AVD yet. So, let’s create one, by clicking on Create button in the right side. And fill the form similar to this –
Remember you can change it any time. Similar way, you can make more then one AVD. Now click OK. Close the AVD Manager window. Now you are ready to develop your application.
To create our first HelloAndroid app, go to File > New > Android Application Project. New Android Application window will appear. Fill –
Now click Next > Next > Next
Choose “Empty Activity” in Create Activity window, again click Next.
Now, set –
Activity Name: HelloAndroidActivity
Layout Name: activity_hello_android
It will create a project for you.
In your project explorer window, you have your HelloAndroid project. Inside it you have following important folders and files, which we will work on.
src: This folder contains all java code.
gen: Never touch this folder. Eclipse automatically generate some java files and keep it here.
assets: You fixed assets will stay here, like some .txt file for your personal app settings.
bin: After build you will get .apk file to install it to your android device.
libs: External libraries stays here.
res: this folder contains all of your app images, layouts and some string values. Mostly these are XML files.
res/drawable: App images stays here.
res/layout: This folder is for your app layout.
res/values: You can keep some string values like plain string or color values, here.
AndroidManifest.xml: This file contains all the setting for your app, like- permissions, min-max android version etc.
Now let’s run our project. Right click on the HelloAndroid project and Run As > Android Application. Your emulator screen will appear with your HelloAndroid application installed.
This tutorial is very basic of starting your Android programming. We did not write any code only have seen screenshots. But from next tutorial we will only write code and less screenshots.
Happy coding… 🙂