Introduction to Android Programming!




Introduction: Introduction to Android Programming!

About: I am a student from Amravati, Maharashtra, India. I love computer, android and electronics.

Hi guys, i am back with my V instructable on Android programming. I know very well that android is easy to learn and about 65% of people know how to program for android. But this instructable for those 35% :D. If you have any ideas, opinions or anything related to this ible, please comment it in the comment section.

In my dad's college there is gathering in which a two day workshop of android programming taken place. It is only for the college students but I requested and I got a chance to learn the android programming! I enjoyed very much. They've teached me four programs but here I am only teaching you one. Other three are advanced and I am going to describe that three programs in my next ibles. Okay, enough talk, let's make it.

Step 1: Downloading.


1. You need the java JDK, because we do 90% of coding in Java, 5% in XML and 5% in C. Link:

2.You need ADT (Android Development Toolkit) in which we code, it is made up of eclipse. Link:

After downloading, extract it and install it.

Step 2: Preparing Eclipse(ADT)

Now after installing open Eclipse(ADT). It will ask you to make a workspace. Give it a desired name then you will see the eclipse window. Workspace is a project bundle in which our projects are saved. Now go to NEW-Android Application Project. As you see in the first image it will ask you to enter Application name. Enter the name of project as "button" because our first project is Button. After typing, click finish and you will get the window like in the second image.

Step 3: Coding Part


package com.example.button;
 import android.os.Bundle;
 import android.view.Menu;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.Toast;
 public class MainActivity extends Activity implements OnClickListener {
 Button a;
 protected void onCreate(Bundle savedInstanceState) {
 public boolean onCreateOptionsMenu(Menu menu) {
 // Inflate the menu; this adds items to the action bar if it is present.
 getMenuInflater().inflate(, menu);
 return true;
 public void onClick(View arg0) {
 // TODO Auto-generated method stub
 Toast.makeText(this, "Here I am writing on instructables.", 5000).show();

You can copy-paste this code or write it yourself. But remember, writing it helps you to learn the language. If you have any questions, you can ask me in the comment section.

So here's the explanation:

As you can see, in the first line, it shows package which we've entered earlier in the second step. Everything with import is the widgets we want to import in the project. The public class shows in which class we are working with. Button a is the variable we have set on the button we have created earlier.

The starting three lines of FirstOverride is by default in our project and it is for making the layout of our project. The fourth line of First Override shows that we are registering our variable a to the widget Button 1. The fifth line shows that we want to do something when Click on our Button.

The Center Override is not really worth and eve I don't know what it is :D :P.

The last Override is the main, because it shows which message we want to show on our screen. The Toast is the method for showing our message. You can think it like print in C language. So, what it is happening over there is, the first word of bracket this is we are telling Android to work on the Button. at the center, we are writing our message which we want to show. You can write anything in the double quotes in the Toast section. Like, I've written "Here I am writing on instructables.". The 5000 is the milliseconds of exact time we want to show this message. They are milliseconds so if we convert it to seconds it will be 5 seconds. You can vary the time and can experiment with it. At last, you can see the show() which is very important to show our message on the screen.

Don't hesitate to ask me anything in the comment section or you can also PM me. Also, don't forget the semicolon at every end of line because it shows our language that which line ends where.

Step 4: AVD(Emulator)

Ok to emulate anything in eclipse we have to make an AVD. AVD means Android Virtual Device. It is a virtual android device on which we can emulate our apps. Go to Window and then in AVD Manager, click new write a name and and Target then click create AVD. In a few minutes our AVD will be created. Go to run and click run. Now your application is emulating......

When the application opens click on the button and it will show your desired message! Congratulations you have created your very first ANDROID APPLICATION.

If you have any questions you can ask me in the comment box and below are some links from which you can learn the advanced knowledge of Android.


Any help will be appreciated and don't forget to vote for me in Make-to-Learn Youth Contest.

Bye and have a good Day.
And Sorry for my bad English :D

Make-to-Learn Youth Contest

Participated in the
Make-to-Learn Youth Contest

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    7 Discussions


    4 years ago

    I just saw following blog where they introduced android programming perfectly. Kudos to these guys:


    Reply 4 years ago



    7 years ago on Introduction

    Very nice article it is.
    Fresher can also learn online professional android app development course from scratch to advanced level including animations in your Application.
    I am also learning the same and you can follow the following link
    So take a free demo form WIZIQ and learn Android app programming from scratch.
    Hope it will beneficial for you too.
    Best of luck


    Reply 7 years ago on Introduction

    Thank you very much for seeing my instructable.


    7 years ago on Step 2

    When I open eclipse it tells me that the "javaw.exe is not in my current PATH" how do I fix this.


    Reply 7 years ago on Step 2

    First check that you have the latest JDK. If you have the JDK then - Go to C:\Program Files\Java\jdk1.7.0_02\bin (This is the default path)
    . Copy this path and go to system settings from control panel. Click on Advanced System Settings -> then go to environment variables -> Click on new and in the field variable name type path and then paste that path you have copied in the variable value with semi colon in last like this C:\Program Files\Java\jdk1.7.0_02\bin; and Click OK. Hope this works for you.