Wanna make your first Android App? In Plain English!

I successfully made my first app, few weeks back and thought, i couldn’t hold this to myself, It’s very easy, if its in plain english! Thanks to many great tips and links from my friends/developers i’ve done it. It’s a simple app that has only on purpose, its called Citibank Mobile, its a shortcut to the mobile site.

Any way straight to the point of this blog post, im going to walk you through the process of creating the app. If you have a computer, you can develop for Android. You don’t have to buy a specific brand of hardware to get started. If your planning on publishing your apps http://market.android.com/publish it only cost $25 to become a developer, not like apple $99/year.

Software you need to install:

First, download the latest JDK (Java Developers Kit) from Sun: http://java.sun.com/javase/downloads/index.jsp The recommended package is Java SE (Standard Edition). Just select the JDK and you will be taken to a widget to download the correct version for your OS.

Second, download Eclipse IDE from http://www.eclipse.org/downloads/ and select Eclipse for Java Developers. Then just select your OS.

Finally, download the Android SDK: http://developer.android.com/sdk/index.html

Unzip the Android SDK and remember where you saved the files (I placed mine in the Applications folder on my Mac, Program Files on my PC). If you want to configure the path to make getting to the SDK tools and installing the Android Development Tools (ADT), you can find concise directions at http://developer.android.com/sdk/installing.html#Installing
The Android Development Tools (ADT) are a set of extensions for Eclipse that make developing for an Android device much easier.
If you’re going to use Eclipse to develop Android apps, you need to install

ADT

Adding ADT to your Eclipse install is easy. Just click Help > Install New Software.

Click on the ADD button, and enter Android Development Tools for the name and https://dl-ssl.google.com/android/eclipse/ for the location. If
have problems with the install, you might try it the install as http instead of https.
Select the Developer Tools in the next dialog, read and accept the license agreement, and click Finish.

Configure the ADT

Now we need to the let the ADT know where the SDK is installed. This accomplished in the Preferences (Eclipse > Preferences on the Mac, Window > Preferences in Windows). Select Android, then in the SDK Location area, browse to where you installed the SDK.

Components

The final step before we can program is to use the Android SDK and AVD (Android Virtual Devices) Manager to install needed components. Don’t skip this step! You need some virtual devices and SDK components to be able to make everything work!

To launch, in Eclipse, go to Window > Android SDK and AVD Manager. In the dialog box, select Available Packages in the left column, and then select all of the packages in the right window (no sense in messing around!). Click Install Selected. You may have to agree to some of the packages.

ADV

Go to Window> Android SDK and AVD Manager. Select Virtual Devices in the left window, and click New.

The Create New AVD dialog window will open. Name it ‘my_avd’.
Select the target platform (which version of Android you are developing for, in my case 2.2).

You can ignore the rest of the fields for now, just click Create AVD.
Close the manager.

Now the App:

Click File > New > Project. If the ADT is properly installed, you should see Android in the list of choices.
Select Android, which should show Android Project as a subcategory.
Select Android Project and click Next.

In the dialog box, enter:
Project Name: HelloWorld (NO SPACES!)
Application Name: Hello World (Spaces are okay)
Package Name: com.example.HelloWorld (or your name space, mine is net.demero.helloworld) (demero.net is my app website…)
Create Activity: HelloWorld (NO SPACES)
And click Finish
In your Package Explorer window, you should be able to open the HelloWorld Project > src > com.example.helloworld > HelloWorld.java
If you double click on HelloWorld.java, it will open in the main window with.
Youtube Video

ADT

(screenshot after done)
Click File > New > Project. If the ADT is properly installed, you should see Android in the list of choices. Select Android, which should show Android Project as a subcategory. Select Android Project and click Next.
In the dialog box, enter:
Project Name: HelloWorld (NO SPACES!)
Application Name: Hello World (Spaces are okay)
Package Name: com.example.HelloWorld (or your name space, mine is com.burtonsmediagroup.helloworld)
Create Activity: HelloWorld (NO SPACES)
And click Finish
In your Package Explorer window, you should be able to open the HelloWorld Project > src > com.example.helloworld > HelloWorld.java
If you double click on HelloWorld.java, it will open in the main window with:

The simple coding:


Under the import statements, add:
import android.widget.TextView;

Under public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Add:
TextView tv = new TextView(this);
tv.setText(“Hello World”);
setContentView(tv);

Before the }

and your done. yea that easy… 😉

Note: Don’t copy and paste, may find some errors.

Now to see what your app looks like!

Go ahead and run it (as an Android Project) Run > Run You should see the simulator start and eventually your project will run.

Now your officially an inventor.

Source: Burtons Media Group

Advertisements

2 Responses to “Wanna make your first Android App? In Plain English!”

  1. minority scholarships Says:

    Terrific work! This is the type of information that should be shared around the web. Shame on the search engines for not positioning this post higher!

  2. Monitronics Home Security System Sticker GE DSC ADT - TJP Home Goods Says:

    […] Wanna make your first Android App? In Plain English! « Team Android […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: