So I’m diving into programming for mobile apps. I’ll be developing ‘Hello World’ apps for OS’s with large market shares: IOS, Android, Blackberry, Bada, and Windows. This will help me gain some knowledge and spread the word. So, let’s go; first Up: Android.
The first thing you should do is download eclipse if you don’t already have it installed on your machine. This will allow you to skip steps Android’s development site suggests you take in setting up your development environment. The Droid team suggests you either download the Eclipse IDE for Java Developers, Eclipse for Java EE Developers or Eclipse Classic, but recommends the Classic version.
After Eclipse is installed, we need to install the Android SDK and Android Developer Tools (ADT). Go to [Help->Install New Software...]
On the ‘install’ dialog box, under the ‘work with’ drop-down menu click ‘add’.
Type in the a name and enter a location; in this case ‘https://dl-ssl.google.com/android/eclipse/’.
Now you should be able to see the ‘developer tools’ tree view. Expand it and you’ll see the following:
- Android DDMS
- Android Development TOols
- Android Heirarchy viewer
- Android Traceview
For the sake of this tutorial you need only ADT; but, I downloaded all of them. They will install after you hit ‘finished’. You may have to restart, eclipse, I’m not sure. If you’re prompted to, please do.
Once you have ADT downloaded and installed, go to the Android SDK manager [Window->Android SDK Manager].
Here you can download platform specific SDK’s and developer tools. I chose the platform with largest amount of users; Android 2.1 or API 7 as well as its samples and Google APIs. Click ‘install packages’.
They will also download and be installed automatically; you may need to restart Eclipse.
Now we’re getting close to actually coding. Create a new project.
In eclipse start a new project. [File->new project]
Click next.
For your package name, com.example.your-package-name. The com.example namespace is reserved for example documentation.
Click ‘create activity’ and set the name to your-project-nameActivity, chose the minimum SDK and click finish.
Before we start writing we have to set up the Android Virtual Device.
Go to Window->AVD Manager
Once there click ‘new’. On the next screen, type in a name and select a (platform) target. Your choices available will depend on which platform(s) you downloaded. After choosing your target, click
Create AVD.
Now in the package viewer expand src->com.example.your-package-name->your-project-name.java->your-projectname.
Now, we write some code. Underneath import android.os.Bundle; write
android.widget.TextView;
Under public void onCreate() function below super.onCreate(savedInstanceState) write:
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
Click run.
You should see the Android virtual device pop-up. It took a while on
my machine to actually execute the program so wait for it to finish.
Boom! You’re finished.
Thoughts
Android has a huge market share and it’s growing. It’s obviously an OS that
developers should have at the very least some understanding of.
Here are some advantages and disavantages of Android.
Advatages:
- Android customer reach
- Plenty of support
- Heavlily supported by Eclipse
meaning you get to use an industry standard IDE -for free - Android is an open source OS
- I didn’t pay anything for to develop the app.
Disadvantages
- Too many platforms
- On my machine the AVD didn’t run smoothly










