0% found this document useful (0 votes)
22 views5 pages

Android Mobile Application Build On Ecli

This document discusses how to set up an Android development environment using Eclipse. It explains how to install the Android SDK, ADT plugin for Eclipse, and create an Android Virtual Device for testing applications. The document then provides steps for creating a new Android project in Eclipse and debugging apps.

Uploaded by

elvintolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Android Mobile Application Build On Ecli

This document discusses how to set up an Android development environment using Eclipse. It explains how to install the Android SDK, ADT plugin for Eclipse, and create an Android Virtual Device for testing applications. The document then provides steps for creating a new Android project in Eclipse and debugging apps.

Uploaded by

elvintolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 1

ISSN 2250-3153

Android Mobile Application Build on Eclipse


Garima Pandey*, Diksha Dani**
*
Department of Computer Science & Engg, Mahamaya Technical University, Noida
**
Department of Computer Science & Engg,, Inderprastha Engineering College, Ghaziabad
India

Abstract- Android is now the most used mobile operating


system in the world. Android now has more users, more phones
and more tablets worldwide than any other mobile operating
system. The Google Play app store has been growing at
breakneck speed and with almost as many apps as the Apple app
store. This, for entrepreneurs and developers, is the chance of a
lifetime to make even more money and reach an even broader
audience base.
This paper gives a complete knowledge of how to start working
on eclipse and develop an application and get it run on emulator.

Index Terms- Android SDK, ADT plug-in, AVD manager,


Eclipse-IDE, java/c++, Android Apps Development.

I. INTRODUCTION

A ndroid is a Linux-based, open source mobile operating


system developed by Open Handset Alliance led by Google
to develop apps for Android devices. To start with we use a set of
tools that are included in the Android SDK. Once we have
downloaded and installed the SDK, we can access these tools
right from our Eclipse IDE, through the ADT plug-in, or from
the command line. Developing with Eclipse is the preferred
method because it can directly invoke the tools that we need
while developing applications..

The basic steps for developing applications are shown in Figure


1. The development steps encompass four development phases,

 Setup: During this phase we install and set up our


which include: Figure 1. Steps for Application Development

development environment. We also create Android


Virtual Devices (AVDs) and connect hardware devices, This paper is distributed in following sections:

 Development: During this phase we set up and develop


on which we can install our applications. 1) Abstract
2) Introduction
our Android project, which contains all of the source 3) Eclipse

 Debugging and Testing: During this phase we build our


code and resource files for our application. 4) Tools and environment
5) Development of an app
project into a debug gable .apk package that we can 6) Conclusions

 Publishing: During this phase we configure and build


install and run on the emulator.

our application for release and distribute our application


to users. II. ECLIPSE
Eclipse is an integrated development environment (IDE). It
contains a base workspace and an extensible plug-in system for
customizing the environment. Written mostly in Java, Eclipse
can be used to develop applications in Java.
The initial codebase originated from IBM. The Eclipse software
development kit (SDK), which includes the Java development

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 2
ISSN 2250-3153

tools, is meant for Java developers. Users can extend its abilities
by installing plug-ins written for the Eclipse Platform, such as c. Eclipse IDE
development toolkits for other programming languages, and can There is a list of Eclipse versions that are compatible
write and contribute their own plug-in modules. with the Android SDK. In this paper we are using
Released under the terms of the Eclipse Public License, Eclipse Eclipse 3.7 (Indigo).
SDK is free and open source software (Table 1). d. ADT plug-in for Eclipse
Android Development Tools (ADT) is a plug-in for the
Codename Date Platform Projects
Eclipse IDE that is designed to give us a powerful,
integrated environment in which to build Android
version
applications.
N/A June 2004 3.0[14] ADT extends the capabilities of Eclipse to let us quickly
set up new Android projects, create an application UI,
N/A June 2005 3.1 add packages based on the Android Framework API,
debug applications using the Android SDK tools, and
Luna June 2014 4.4 Luna projects
even export signed (or unsigned) .apk files in order to
(planned)
distribute the application.
Kepler June 2013 4.3 Kepler projects Developing in Eclipse with ADT is highly
recommended and is the fastest way to get started. With
Juno June 2012 4.2[15] Juno projects the guided project setup it provides, as well as tools
3.7[Notes 1]
integration, custom XML editors, and debug output
Indigo June 2011 Indigo projects
pane, ADT gives us an incredible boost in developing
Helios June 2010 3.6 Helios projects Android applications.
Following steps are used to download and install the
Ganymede June 2008 3.4 Ganymede projects ADT plug-in:
Galileo June 2009 3.5 Galileo projects
o Start Eclipse, then select Help ‣ Install New
Software.
Europa June 2007 3.3 Europa projects o Click Add (in the top-right corner).
Callisto June 2006 3.2 Callisto projects

Table 1. Eclipse Releases

III. TOOLS AND ENVIRONMENT


Here we will discuss installation details for our software.
a. Android SDK Tools, revision 20 or newer.
b. SDK Platform Android 3.0 (API 11).
The minimal platform supported by Java API is Android
2.2 (API 8).But for successful compilation the target
platform should be set to Android 3.0 (API 11) or
higher. It will not prevent them from running on
Android 2.2.
Figure 2 gives the look of the window, where we have
to select our required android settings.

Figure 3. ADT-Plugin/Tool Installation


.

o In the Add Repository dialog that appears,


enter “ADT Plug-in” for the Name and the
URL refer to Figure 3.
o Click OK (System must be connected to
internet).
Figure 2. Android SDK Manager

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 3
ISSN 2250-3153

o In the Available Software dialog, select the IV. DEVELOPMENT OF AN APP


checkbox next to Developer Tools and click This app will start with a homepage, here we will setup
Next. background image and set a mp3 sound and welcome text.
o In the next window, we’ll see a list of the tools Then an automatic intent will fire and app will go on to next
to be downloaded. Click Next. page, on 2nd page we will set a counter which will contain 3
o Read and accept the license agreements, then buttons: ADD , SUB , EXIT.
click Finish. Follow these simple 10 steps carefully.
o When the installation completes, restart 1. Go to file>new>android application project.
Eclipse. 2. Open project go to res>layout>activity_main.xml
Here we can start layout design:
e. AVD Manager
The AVD Manager provides a graphical user interface
in which we can create and manage Android Virtual <?xml version="1.0" encoding="utf-8"?>
Devices (AVDs), which are required by the Android <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
Emulator.
android:orientation="horizontal"
o For emulation, we need to define a device. android:layout_width="fill_parent"
o Select Window -> Android AVD Manager android:layout_height="fill_parent">
from the menu (Figure 4).
<Button
android:id="@+id/badd"
android:layout_width="wrap_content"
android:layout_height="78dp"
android:text="ADD"
android:layout_gravity="center"/>

<Button
android:id="@+id/bsub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SUB"
Figure 4. AVD Manager android:layout_gravity="center" />

f. Importing Project <TextView


o Open the import Dialog android:layout_width="fill_parent"
android:layout_height="wrap_content"
o Select File > Import ... to open the import
android:text="YOUR TOTAL IS 0"
dialog. android:gravity="center"
o Import the "MyProject" project android:id="@+id/tvDisplay"
o In the import dialog, expand the General node android:textSize="25sp"
and select Existing Projects into Workspace, >
then click Next to move to the Import Projects </TextView>
step. Make sure that Select root directory is </LinearLayout>
selected, then click the Browse... button.
o In the Browse for Folder dialog, locate the
"MyProject" folder, select it and click OK. 3. For creating action to these buttons, in project
Then, click Finish to import the project. The Go to src>app.com>MainActivity.java
project now shows up in the Package Explorer.
o Launch the "MyProject" project package myapp.com;
o Right click the "MyProject" in the Package
Explorer window, and then select Run As > import android.os.Bundle;
Android Application from the menu. import android.app.Activity;
import android.view.Menu;
g. Deleting Project import android.view.View;
Here is the project-wise solution. Right click the import android.widget.Button;
import android.widget.TextView;
"MyProject" in the Package Explorer window, and then
select Delete from the menu. In the dialog that appears, public class MainActivity extends Activity {
ensure that delete project contents on disk is not
selected if we want to use the project's folders in int counter;
workspace. If not, we can check it before be click OK.

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 4
ISSN 2250-3153

Button add,sub; here we will use mp3 song and set an intent for 5
TextView display; seconds. This will cause the page automatic exit after 5
seconds
@Override Click on Src>app.com(right click)>new>class
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); package myapp.com;
setContentView(R.layout.activity_main); import
. android.app.Activity;
counter = 0; import android.content.Intent;
add = (Button) findViewById(R.id.badd); import android.media.MediaPlayer;
sub = (Button) findViewById(R.id.bsub); import android.os.Bundle;
display = (TextView) findViewById(R.id.tvDisplay);
add.setOnClickListener(new View.OnClickListener() { public class Splash extends Activity {
@Override MediaPlayer oursong;
public void onClick(View v) { @Override
// TODO Auto-generated method stub protected void onCreate(Bundle savedInstanceState) {
counter++; // TODO Auto-generated method stub
display.setText("your total is " + counter); super.onCreate(savedInstanceState);
} setContentView(R.layout.splash);
}); oursong = MediaPlayer.create(Splash.this,R.raw.splashsound);
oursong.start();
sub.setOnClickListener(new View.OnClickListener() { Thread timer = new Thread(){
@Override public void run(){
public void onClick(View v) { try{
// TODO Auto-generated method stub sleep(5000);
counter--; }catch(InterruptedException e){
display.setText("your total is " + counter); e.printStackTrace();
} }finally{
}); Intent n = new Intent("myapp.com.MainActivity");
} startActivity(n);
}
@Override }
public boolean onCreateOptionsMenu(Menu menu) { };
// Inflate the menu; this adds items to the action bar if it is timer.start();
present. }
getMenuInflater().inflate(R.menu.main, menu); @Override
return true; protected void onPause() {
} // TODO Auto-generated method stub
} super.onPause();
oursong.release();
}
4. On desktop copy one sound file with mp3 extension and }
one image for setting background (rename it in small
letter, example aaa.jpg,splash.mp3).
5. Right click on res>layout>new>folder. 9. Set Android Manifest file
Save mp3 file here. Click AndroidManifest.xml
6. Click res>drawable-hdpi. Copy Activity area and set one action class as
Save image file here. LAUNCHER and another class as DEFAULT.
7. Right click on layout>new>others>example.xml
Here we create new xml file for our welcome page and <activity
we will set our background image. android:name="myapp.com.Splash"
android:label="@string/app_name" >
<intent-filter>
<?xml version="1.0" encoding="utf-8"?> <action android:name="android.intent.action.MAIN" />
<LinearLayout <category
xmlns:android="http://schemas.android.com/apk/res/android" android:name="android.intent.category.LAUNCHER" />
android:layout_width="match_parent" </intent-filter>
android:layout_height="match_parent" </activity>
android:orientation="vertical" <activity
android:background="@drawable/splash_backgroung"> android:name="myapp.com.MainActivity"
</LinearLayout> android:label="@string/app_name" >
<intent-filter>
<action android:name="myapp.com.MainActivity" />
8. Here we will create a new class for the new xml page <category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 5
ISSN 2250-3153

ACKNOWLEDGMENT
I express my gratitude to my guide Professor Diksha Dani,
department of computer science and engineering, IPEC
10. Right click on project>Run As>1 Android Application
Ghaziabad, for giving the opportunity and facilities to carry out
this application development. I must also express my sincere
The above steps will help us in System Environment,
thanks to Mr. Rohit Pandey, STMicroelectronics, Greater Noida,
Developing Application and get it run on emulator.
These are all basic steps of android programming. Here main for his invaluable guidance and support that have added a great
deal to substance of this paper.
 xml layout
work is carried out in following sections:

 java class REFERENCES


 string class [1] Shyam Bhati, Sandeep Sharma, Karan Singh "Review On Google Android a
 manifest files
Mobile Platform" IOSR Journal of Computer Engineering(IOSR-JCE) e-
ISSN: 2278-0661, p-ISSN: 2278-8727Volume 10, Issue 5 (Mar. - Apr.
Android apps have reached a new level of construction 2013), PP 21-25
where it is working on the concept of Apple’s SIRI [2] Khawlah A. AI-Rayes, Aise Zulal Sevkli, Hebah F. AI-Moaiqel, Haifa M.
application, voice command apps, home security etc. AI-Ajlan, Khawlah M. AI-Salem, Norah I. AI-Fantoukh "A Mobile Tourist
Guide for Trip Planning" IEEE MULTIDISCIPLINARY ENGINEERING
In this paper basic structure for building an android app is EDUCATION MAGAZINE, VOL. 6, NO. 4, DECEMBER 2011
covered. [3] Priyanka Shah, Ruta Gadgil, Neha Tamhankar "Location Based Reminder
Using GPS For Mobile (Android)" ARPN Journal of science and
Technology ©2011-2012. VOL. 2, NO. 4, May 2012
[4] Sumaiya Patel, Darshana Thakur, Sujit Sekhar. Priyanks Dhamane "Lockme
- Android Security Application" IJCER, VOL. 3, Issue. 3
V. CONCLUSION
[5] http://developer.android.com
Our objective behind this paper presentation was to discuss all
basic details to start android application and to overcome the
technical jargons which come as a big constraint on the way of
beginner programmer. AUTHORS
Simplicity was the major factor in explaining all installation
process of eclipse and a simple android application, which will First Author – Garima Pandey , M. Tech, Mahamaya Technical
University, Noida, [email protected].
give a bust to all aspiring android developers.
Second Author – Diksha Dani, M. Tech, Inderprastha
Engineering College, Ghaziabad.

www.ijsrp.org

You might also like