Monday, May 19, 2014

Get Started Developing for Android with Eclipse


Get Started Developing for Android with Eclipse
We are going see how to make a very simple Android app (in our case, a product inventory app) that will call a PHP script to perform basic CRUD (CreateReadUpdateDelete) operations. To brief you on the architecture, this is how it works. First your android app calls a PHP script in order to perform a data operation, lets say “create”. The PHP script then connects to your MySQL database to perform the operation. So the data flows from your Android app to PHP script then finally is stored in your MySQL database. Allright, lets dig deeper.

1. Download & Install the Android SDK

a. Download the Android SDK
b. Install/Extract the downloaded SDK
c. Go to the directory where you installed the SDK and open SDK Manager to open Android SDK and AVD Manager.
d. In AVD manager under Avaliable Packages you can see different versions of SDK’s
e. Select SDK Platform tools and one of the version of SDK and click on install

 

2. Downloading Eclipse Software

Although there are lot of IDE out there Eclipse is recommended IDE which will give you best support for Android app development.

 

3. Installing Android Development Toolkit (ADT) plug-in

a. Open Eclipse s/w and under Help -> Install New Software
b. Now you will see a window which allows you to install new plug-in
c. Click on Add button and in Name and in Location give the link https://dl-ssl.google.com/android/eclipse/ and proceed with further steps.

4. Creating Sample Project

Creating a sample android project involves very few steps
a. In your Eclipse IDE go to File -> Android Project
b. Give Project Name, Select Build Target, Application Name, Package Name, Activity Name, Min SDK version and click Finish
c. Now you can see bunch of files created in the project explorer.

5. Creating New Android Virtual Device (AVD)

The AVD is an emulator which provides you android hardware and software environment to test application on computer.
a. In Eclipse open SDK Manager under Windows -> Android SDK and AVD Manager
b. Click on New on the right side.
c. Give Name, Select Target give SD Card size and click on Create AVD.
d. Now a new AVD is created with the specification you provided and Close the Android SDK and AVD Manager

6. Running the Project

Once you successfully created AVD you are ready to test your application.
a. Right Click on the project in Package Explore and click on Run As -> Android Application.
b. Now you can see an AVD is opened and booting up.( It will take much time to launch AVD for the first time)
c. Once the AVD started you can see the output on the AVD screen.
Newer Post
Previous
This is the last post.

0 comments:

Post a Comment

Copyright © 2012 Android Study All Right Reserved