December 26, 2013

How to Sign an Android Application

             
                     In this Blog I want to explain How to Sign an Android Application.  Steps,

* Right click your Application Project and then Select Android Tools-> Export Signed Application Package.

* Then It will Show Export Signed Application Package Dialog and In this Dialog it will Show the Application Name. Then Press Next.

 * Then It will ask for keystore. Browse the Keystore and enter the password of keystore then press Next.

 * Then it will show the key alias in the keystore. Select the key alias and enter the password then press Next.


 * Browse the Destination of .apk file to Save. It will show the Certificate expire date and MD5 and SHA1 values of the signed keytool. Press Finish.





 

How to Create a Keytool in MAC


                      Keytool is a Certificate which is used to sign the Application. This is used to identify the author of the application also establishing relationship between application. When the user want to publish the app in to Google Pay the User have to Sign the application with a Keytool.

In this Blog I am going to Explain How to Create a Keytool in MAC.

* Open Terminal

*  Insert Comment
keytool -genkey -v -keystore keystore_Name.keystore -alias key_alias_Name -keyalg RSA -keysize 2048 -validity 10000


Then It will Ask for Password and some other details.

December 24, 2013

How to import an Android project into Eclipse

In this Blog I am Explain How to import an Existing Android Application Project into Eclipse.

* Start Eclipse and select File Menu ->Import. Then it will display import dialog.  
*  Select Android ->  Existing Android code in to Workspace.





Browse the project location. After when we browse the location it will display the project name on the same window and then press Finish. If you want to copy the project into your workspace the check on "Copy projects to workspace".

 
* Then Press Finish. Then we can see the project in Eclipse’s Package Explorer.

 

November 07, 2013

Android Custom Listview.



main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

  <ListView
      android:id="@+id/Listview"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" />
   
</LinearLayout>


Home.java

public class Home extends Activity{

private ListView HomeItemListView;
private  ListAdapter adapter;

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

      HomeItemListView = (ListView) findViewById(R.id.Listview);
      adapter = new ListAdapter(this);
       
        HomeItemListView.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view, int position,
                    long id) {

                ListItem listItem = (ListItem) adapter.getItem(position);
                System.out.println("Selected Item : " +  listItem.getItemID());
              
            }
        });

}

}

ListAdapter.java

import java.util.ArrayList;

import com.strat.stratpromo.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;


public class ListAdapter extends ArrayAdapter<ListItem> implements OnClickListener {
    public Context context;
    public ArrayList<HomeItem> HomeItemList;
    public ImageLoader imageLoader;
   
    public HomeListAdapter(Context context, int resource, ArrayList<HomeItem> HomeItemLst) {
        super(context, resource, HomeItemLst);
        this.context = context;
        this.HomeItemList = HomeItemLst;
        imageLoader = new ImageLoader(context);
    }
   
    @Override
    public int getCount() {
        if (HomeItemList != null)
            return HomeItemList.size();

        return 0;
    }

    @Override
    public HomeItem getItem(int position) {
        return HomeItemList.get(position);
    }
   
    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        View myConvertView = null;
        try {
            final HomeItem HomeItem = HomeItemList.get(position);
            myConvertView = convertView;
            if (myConvertView == null) {
                LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                myConvertView = inflater.inflate(R.layout.home_list_item_view, null);
            }
            ImageView CatImage = (ImageView) myConvertView.findViewById(R.id.list_image);
            TextView CatHeader = (TextView) myConvertView.findViewById(R.id.title);
            TextView CatDiscount = (TextView) myConvertView.findViewById(R.id.discount);
            TextView CatDescription = (TextView) myConvertView.findViewById(R.id.description);
           
            CatHeader.setText(HomeItem.getTitle());
            CatDiscount.setText(HomeItem.getDiscount());
            CatDescription.setText(HomeItem.getSubTitle());
           
            imageLoader.DisplayImage(HomeItem.getImageUrl(), CatImage);
       
            //    Bitmap bm = Helper.getBitmap(HomeItem.getImageUrl());
            /*String filePath = Helper.saveImageInExternalCacheDir(context, bm,
                        HomeItem.getTitle()+HomeItem.getPromotionID());*/
           
            //CatImage.setImageBitmap(bm);   
           
        } catch (Exception e) {
             e.printStackTrace();
        }
        return myConvertView;
    }
   
    @Override
    public long getItemId(int position) {
        return position;
    }

    public void onClick(View v) {
        // TODO Auto-generated method stub
       
    }
   
}

Importing Image From Gallery

In this tutorial I want to explain how to import images from Gallery to am imageview,

In this I am having One Button and One ImageView. While Tap on the button it will redirect to Gallery to Browse image. While we select an image it will display on the Imageview.

activity_main.xml

This is a Layout of main page. This layout contain One Button and one Imageview.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Insert Image" />

    <ImageView
        android:id="@+id/ImgPhoto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@drawable/ic_launcher" />

</LinearLayout>

MainActivity.java


import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.media.ExifInterface;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore.Images;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

public class MainActivity extends Activity {
   
    private static final int PICTURE_GALLERY_REQUEST = 22;

    Uri cameraUri;
   
    Button BtnSelectImage;
    private ImageView ImgPhoto;
    private String Camerapath ;
   
   
   
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
       
        ImgPhoto = (ImageView) findViewById(R.id.ImgPhoto);
       
        BtnSelectImage = (Button) findViewById(R.id.BtnSelectImg);
        BtnSelectImage.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                // TODO Auto-generated method stub
                Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
                  photoPickerIntent.setType("image/*");
                  startActivityForResult(photoPickerIntent, PICTURE_GALLERY_REQUEST);
            }
        });
       
    }
   
   
    @Override
    public void onActivityResult(final int requestCode, int resultCode, Intent data) {
        try {
            switch (requestCode) {
            case PICTURE_GALLERY_REQUEST:
                if (resultCode == RESULT_OK) {
                    try {
                        Uri selectedImage = data.getData();
                        ImgPhoto.setImageBitmap(decodeUri(selectedImage));
                    } catch (Exception e) {
                        Toast.makeText(this, "Couldn't load photo", Toast.LENGTH_LONG).show();
                    }
                }
                break;
              default:
                break;
            }
        } catch (Exception e) {
        }
    }
    
   

     private Bitmap decodeUri(Uri selectedImage) throws FileNotFoundException {
         BitmapFactory.Options o = new BitmapFactory.Options();
         o.inJustDecodeBounds = true;
         BitmapFactory.decodeStream(
                 getContentResolver().openInputStream(selectedImage), null, o);

         final int REQUIRED_SIZE = 100;

         int width_tmp = o.outWidth, height_tmp = o.outHeight;
         int scale = 1;
         while (true) {
             if (width_tmp / 2 < REQUIRED_SIZE || height_tmp / 2 < REQUIRED_SIZE) {
                 break;
             }
             width_tmp /= 2;
             height_tmp /= 2;
             scale *= 2;
         }

         BitmapFactory.Options o2 = new BitmapFactory.Options();
         o2.inSampleSize = scale;
         //return BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o2);
         Bitmap b = BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o2);
         Matrix matrix = new Matrix();
         float rotation = rotationForImage(getApplicationContext(), selectedImage);
         if (rotation != 0f) {
               matrix.preRotate(rotation);
          }
         Bitmap resizedBitmap = Bitmap.createBitmap(
                 b, 0, 0, width_tmp, height_tmp, matrix, true);
         return resizedBitmap;
     }
    
    
     public static float rotationForImage(Context context, Uri uri) {
        if (uri.getScheme().equals("content")) {
        String[] projection = { Images.ImageColumns.ORIENTATION };
        Cursor c = context.getContentResolver().query(
                uri, projection, null, null, null);
        if (c.moveToFirst()) {
            return c.getInt(0);
        }
    } else if (uri.getScheme().equals("file")) {
        try {
            ExifInterface exif = new ExifInterface(uri.getPath());
            int rotation = (int)exifOrientationToDegrees(
                    exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,
                            ExifInterface.ORIENTATION_NORMAL));
            return rotation;
        } catch (IOException e) {
            Log.e("Photo Import", "Error checking exif", e);
        }
    }
        return 0f;
    }

    private static float exifOrientationToDegrees(int exifOrientation) {
    if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_90) {
        return 90;
    } else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_180) {
        return 180;
    } else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_270) {
        return 270;
    }
    return 0;
    }
   
}

November 02, 2013

How to pass Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List with an intent.

           
                 In this blog I want to explain How to pass Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List with an intent.


Intent
                Intent is an object that is used to launch an activity or to return information  from an activity.  To start a new activity using startActivity(intent).  To get information from another activity we start activity using startActivityForResult(intent, requestCode).


               Here in  FromPage.java we are adding  Boolean, Int, String, Integer ArrayList, String ArrayList, int list and String List values to an intent. In ToPage.java We extract added values will retrieve from intent. 


FromPage.java

ArrayList<Integer>  IntArrayList = new  ArrayList<Integer>(Arrays.asList(100,13,18,22,44,13));
ArrayList<String>  StringArrayList = new  ArrayList<String>(Arrays.asList("String1", "String2", "String3", "String4"));

        int[] intList = {4, 6, 3, 8, 2, 10};
        String[] StringList = {"String1", "String2", "String3", "String4"};

        Intent intent = new Intent(FrstPage.this, SecondPage.class);
        intent.putExtra("BoolValue", true);
        intent.putExtra("IntValue", 199);
        intent.putExtra("StringValue", "Test String");
        intent.putExtra("IntArrayList", IntArrayList);
        intent.putExtra("StringArrayList", StringArrayList);
        intent.putExtra("IntList", intList);
        intent.putExtra("StringList", StringList);
        startActivity(intent);



ToPage.java

            Intent intent = getIntent();
            boolean fullscreenAd =  intent.getBooleanExtra("BoolValue", false);
            int IntValue =  intent.getIntExtra("IntValue", 0);
            String StringValue =  intent.getStringExtra("StringValue");
            ArrayList<Integer> IntArrayList =  intent.getIntegerArrayListExtra("IntArrayList");
            ArrayList<String> StringArrayList =  intent.getStringArrayListExtra("StringArrayList");
            int[] intList =  intent.getIntArrayExtra("IntList");
            String[] StringList =  intent.getStringArrayExtra("StringList");




October 25, 2013

Android TimePickerDialog

In this tutorial I want to explain about creating a  TimePickerDialog like,



In this I am having One Button and One EditText. On this example first it will load the current time to the EditText, While Tap on the button it will display the TimePickerDialog with the current time after tap on Done button TimePickerDialog it will update in the EditText.
 


activity_main.xml

This is a Layout of main page. This layout contain One Button and one EditText.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Select Time" />

    <EditText
         android:id="@+id/EdtTxtTime"
         android:layout_width="wrap_content"
          android:layout_height="wrap_content"
         android:ems="10"
         android:focusableInTouchMode="false"
         android:inputType="text" />

</LinearLayout>



MainActivity.java
 
public class MainActivity extends Activity {
       Button BtnSelectTime;
   private EditText EdtTxtTime;
   private static Context context;
   
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

           context=MainActivity.this;
           EdtTxtTime = (EditText) findViewById(R.id.EdtTxtTime);

            String Time = getCurrentTime();
            if(Integer.parseInt(Time.substring(0, 2).toString())>12){
                Time = (Integer.parseInt(Time.substring(0, 2).toString())-12)+Time.substring(2);              
            }
            EdtTxtTime.setText(Time);
       
        BtnSelectTime = (Button) findViewById(R.id.BtnSelectTime);
        BtnSelectTime.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                // TODO Auto-generated method stub
              
                             Calendar mcurrentTime = Calendar.getInstance();
                              int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);
                              int minute = mcurrentTime.get(Calendar.MINUTE);
                              TimePickerDialog mTimePicker;
                              mTimePicker = new TimePickerDialog(context, new TimePickerDialog.OnTimeSetListener() {
                                  @Override
                                  public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {
                                      EdtTxtTime.setText( selectedHour + ":" + selectedMinute);
                                  }
                              }, hour, minute, true);//Yes 24 hour time
                              mTimePicker.setTitle("Select Time");
                              mTimePicker.show();

            }
        });
       
    }

//Function to get current time
    public static String getCurrentTime() {
            String DATE_FORMAT_NOW = "HH:mm";
            SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
            return sdf.format(new Date());
     }
   
}

Android DatePickerDialog

In this tutorial I want to explain about creating a  DatePickerDialog like,



In this I am having One Button and One EditText. On this example first it will load the current date to the EditText, While Tap on the button it will display the DatePickerDialog after tap on Done button DatePickerDialog it will update in the EditText.
 


activity_main.xml

This is a Layout of main page. This layout contain One Button and one EditText.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Select Date" />

    <EditText
         android:id="@+id/EdtTxtDate"
         android:layout_width="wrap_content"
          android:layout_height="wrap_content"
         android:ems="10"
         android:focusableInTouchMode="false"
         android:inputType="text" />

</LinearLayout>



MainActivity.java
 
public class MainActivity extends Activity {
       Button BtnSelectImage;
   private EditText EdtTxtDate;
   private static Context context;
   
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

           context=MainActivity.this;
           EdtTxtDate = (EditText) findViewById(R.id.EdtTxtDate);

            String Date = getCurrentDate();
            EdtTxtDate.setText(Date);
       
        BtnSelectDate = (Button) findViewById(R.id.BtnSelectDate);
        BtnSelectDate.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                // TODO Auto-generated method stub
             
                              int monthOfYear, dayOfMonth, year;
                              String DateString = EdtTxtDate.getText().toString().trim();
                              if(DateString.equalsIgnoreCase("")){
                                  DateString = getCurrentDate();
                              }
                              dayOfMonth = Integer.parseInt(DateString.substring(0,DateString.indexOf("-")));
                              monthOfYear =    Integer.parseInt(DateString.substring(DateString.indexOf("-")+1,DateString.lastIndexOf("-")))-1;
                              year = Integer.parseInt(DateString.substring(DateString.lastIndexOf("-")+1));
                             
                              DatePickerDialog datePickerDialog;
                              datePickerDialog = new DatePickerDialog(context, new DatePickerDialog.OnDateSetListener() {
                               
                                @Override
                                public void onDateSet(DatePicker view, int year, int monthOfYear,
                                        int dayOfMonth) {
                                    monthOfYear = monthOfYear+1;
                                    String Month="", Day ="";
                                    if(monthOfYear<10)
                                        Month = "0"+ monthOfYear;
                                    else
                                        Month = monthOfYear+"";
   
                                    if(dayOfMonth<10)
                                        Day = "0"+ dayOfMonth;
                                    else
                                        Day = dayOfMonth+"";
                                   
                                    String AlertDate =  Day+"-"+Month+"-"+year;
                                    EdtTxtDate.setText(AlertDate);
                                }
                            }, year, monthOfYear, dayOfMonth);
                              datePickerDialog.setTitle("Select Date");
                              datePickerDialog.show();

            }
        });
       
    }

//Function to get current date
     public static String getCurrentDate() {
            String DATE_FORMAT_NOW = "dd-MM-yyyy";
            SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
            return sdf.format(new Date());
      }
   
}

October 24, 2013

Importing Image From Camera

            In this tutorial I want to explain how to take a picture in camera ans import that picture to an ImageView using Intent,

In this I am having One Button and One ImageView. While Tap on the button it will open Camera. After that the user can take photo After taking photo it will ask for save image. If the user save the image then it will display on the Imageview.

You can also Inport Image from Camera with the help if File Provider. I am Explains about Capture Image using Camera with the Help of File provider From Here


activity_main.xml

This is a Layout of main page. This layout contain One Button and one Imageview.



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top|center"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/BtnSelectImg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Insert Image" />

    <ImageView
        android:id="@+id/ImgPhoto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@drawable/ic_launcher" />

</LinearLayout>

MainActivity.java


import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.media.ExifInterface;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore.Images;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

public class MainActivity extends Activity {
   
    private static final int CAMERA_PIC_REQUEST = 22;

    Uri cameraUri;
   
    Button BtnSelectImage;
    private ImageView ImgPhoto;
    private String Camerapath ;
   
   
   
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
       
        ImgPhoto = (ImageView) findViewById(R.id.ImgPhoto);
       
        BtnSelectImage = (Button) findViewById(R.id.BtnSelectImg);
        BtnSelectImage.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                // TODO Auto-generated method stub
                try {
                       Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
                       startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
                } catch (Exception e) {
                    Toast.makeText(getApplicationContext(), "Couldn't load photo", Toast.LENGTH_LONG).show();
                }
            }
        });
       
    }
   
   
    @Override
    public void onActivityResult(final int requestCode, int resultCode, Intent data) {
        try {
            switch (requestCode) {
           case CAMERA_PIC_REQUEST:
                if (resultCode == RESULT_OK) {
                    try {
                          Bitmap photo = (Bitmap) data.getExtras().get("data");
                         
                          ImgPhoto.setImageBitmap(photo);   
                         
                    } catch (Exception e) {
                        Toast.makeText(this, "Couldn't load photo", Toast.LENGTH_LONG).show();
                    }
                }
                break;
              default:
                break;
            }
        } catch (Exception e) {
        }
    }
    
   
}

custom listview with separate headers




Here is the  custom listview with separate headers Blog. This Blog will help you to create seperate header for a list link,

October 10, 2013

Create Android Application

                                          After installing Eclipse and all the components required for android development (You can use This Tutorial for to knew How to start Android Development). Now you can create your first Hello World Android Application.

Create Hello World Application.

You can create your Android application through two ways.

1. In Eclipse File menu -> New -> Android Application Project

2.  Right click on your Package Explorer -> New ->Android Application Project

Enter the Application Name, Project Name, Package Name, Minimum Required SDK, Target SDK, Compile with, Theme for the new android application on the Window.


Application name is the name of the application
Project name is the name of the project directory which is displayed on the project explorer and also the folder name of your application created in your android workspace.
Package name is the namespace of your application. which is unique for all the packages installed on your android system.
Minimum Required SDK is the lowest version of android which supports your application.
Target SDK is the highest version of android which supports your application.

After Filling all the values press Next Button

Next screen is Configure project screen. 
      You just skip it by press Next Button.

Next screen is Configure Launcher icon Screen.

     Launcher icon is the icon of your application. Press Next Button

Next screen is Create Activity screen.
 
     You can create the type of activity screen on here. Press Next Button

Next screen is Activity Creation screen.

    On this screen you can enter the name of the Activity also the Layout name.Then Press Finish Button

August 31, 2013

How to Start Android Development

About Android

                 Android is an Operating System. which is build on the open Linux Kernal. So it is Open Source. Android provides more user interface libraries, Background processing, Access to file system. Databases, Also Android enables developers to obtain the location of android device. So we can make more applications using Android.

                In this Blog I am going to tell you how to start android development and what are the things required to develop an android application.

  • Java
             *  Download java form Here.
             Set Environment variable. You can Refer this Link for setting Environment variable.
  • Android SDK
             Android SDK is a software development kit. Using this we can create application for the android application. This provides Sample source code, API libraries, development tools, emulator which is for run and debug the application.


           *  Download Android SDK from Here and INSTALL it.
  • Eclipse
            Eclipse is used as Android Development tool plugin.
            *  Download Eclipse java version from Here.

  • ADT Plugin
            Install Android Development Tool (ADT) is a  plugin for  Eclipse IDE. This is to build Android application in Eclipse. It extends the capabilities of Eclipse to setup an android project quickly, to build the User Interface, Run and debug the application and export signed or unsigned application packages for distribution.

           ADT plugin installation
           *  Start Eclipse and select Help Menu ->Install New Software
           *  Press in ADD button on the top right corner of dialog.
           *  Add Name as "ADT plugin" and add location  "  https://dl-ssl.google.com/android/eclipse" and then press OK
           *  Form the next screen Available Software screen Select all and press NEXT Button.
           *  In the next screen you can see the tools to download then press NEXT button.
           *  Read and Accept license agreement and press FINISH button.
           *  After Installation RESTART Eclipse.
  • Set Android SDK Location in Eclipse 
           Setting SDK Location
          *  Start Eclipse and Select Window menu -> Preferences
          *  In the dialog select Android Menu on the Left side.
          *  Add SDK location as installed location up to tools or platform-tools and then press ok.

  • Install Android SDK version
           Installing SDK versions
          *  In Eclipse and Select Window menu -> Android SDK Manager.
          *  In the dialog select tools, versions of android and Extras then press install.
          *  After installation restart the Eclipse and continue Android Development.