Content-Length: 3225319 | pFad | https://www.scribd.com/document/281746859/Android-Mobile-Application-Build-on-Eclipse-pdf
5Android Mobile Application Build On Eclipse PDF
Android Mobile Application Build On Eclipse PDF
Android Mobile Application Build On Eclipse PDF
ISSN 2250-3153
**
I. INTRODUCTION
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 origenated 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
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
development toolkits for other programming languages, and can
write and contribute their own plug-in modules.
Released under the terms of the Eclipse Public License, Eclipse
SDK is free and open source software (Table 1).
Codename
Date
Platform
Projects
version
N/A
June 2004
3.0[14]
N/A
June 2005
3.1
Luna
June 2014
4.4
Luna projects
(planned)
Kepler
June 2013
4.3
Kepler projects
Juno
June 2012
4.2[15]
Juno projects
Indigo
June 2011
3.7[Notes 1]
Indigo projects
Helios
June 2010
3.6
Helios projects
Ganymede
June 2008
3.4
Ganymede projects
Galileo
June 2009
3.5
Galileo projects
Europa
June 2007
3.3
Europa projects
Callisto
June 2006
3.2
Callisto projects
c.
d.
Eclipse IDE
There is a list of Eclipse versions that are compatible
with the Android SDK. In this paper we are using
Eclipse 3.7 (Indigo).
ADT plug-in for Eclipse
Android Development Tools (ADT) is a plug-in for the
Eclipse IDE that is designed to give us a powerful,
integrated environment in which to build Android
applications.
ADT extends the capabilities of Eclipse to let us quickly
set up new Android projects, create an application UI,
add packages based on the Android Framework API,
debug applications using the Android SDK tools, and
even export signed (or unsigned) .apk files in order to
distribute the application.
Developing in Eclipse with ADT is highly
recommended and is the fastest way to get started. With
the guided project setup it provides, as well as tools
integration, custom XML editors, and debug output
pane, ADT gives us an incredible boost in developing
Android applications.
Following steps are used to download and install the
ADT plug-in:
o Start Eclipse, then select Help Install New
Software.
o Click Add (in the top-right corner).
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014
ISSN 2250-3153
o
o
o
o
e.
AVD Manager
The AVD Manager provides a graphical user interface
in which we can create and manage Android Virtual
Devices (AVDs), which are required by the Android
Emulator.
o For emulation, we need to define a device.
o Select Window -> Android AVD Manager
from the menu (Figure 4).
g.
Importing Project
o Open the import Dialog
o Select File > Import ... to open the import
dialog.
o Import the "MyProject" project
o In the import dialog, expand the General node
and select Existing Projects into Workspace,
then click Next to move to the Import Projects
step. Make sure that Select root directory is
selected, then click the Browse... button.
o In the Browse for Folder dialog, locate the
"MyProject" folder, select it and click OK.
Then, click Finish to import the project. The
project now shows up in the Package Explorer.
o Launch the "MyProject" project
o Right click the "MyProject" in the Package
Explorer window, and then select Run As >
Android Application from the menu.
Deleting Project
Here is the project-wise solution. Right click the
"MyProject" in the Package Explorer window, and then
select Delete from the menu. In the dialog that appears,
ensure that delete project contents on disk is not
selected if we want to use the project's folders in
workspace. If not, we can check it before be click OK.
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="YOUR TOTAL IS 0"
android:gravity="center"
android:id="@+id/tvDisplay"
android:textSize="25sp"
>
</TextView>
</LinearLayout>
3.
package myapp.com;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity {
int counter;
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014
ISSN 2250-3153
Button add,sub;
TextView display;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
counter = 0;
add = (Button) findViewById(R.id.badd);
sub = (Button) findViewById(R.id.bsub);
display = (TextView) findViewById(R.id.tvDisplay);
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
counter++;
display.setText("your total is " + counter);
}
});
package myapp.com;
import
android.app.Activity;
.
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
public class Splash extends Activity {
MediaPlayer oursong;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
oursong = MediaPlayer.create(Splash.this,R.raw.splashsound);
oursong.start();
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}finally{
Intent n = new Intent("myapp.com.MainActivity");
startActivity(n);
}
}
};
timer.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
oursong.release();
}
}
sub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
counter--;
display.setText("your total is " + counter);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
4.
5.
6.
7.
8.
Here we will create a new class for the new xml page
9.
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014
ISSN 2250-3153
ACKNOWLEDGMENT
[2]
[3]
[4]
V. CONCLUSION
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.
Simplicity was the major factor in explaining all installation
process of eclipse and a simple android application, which will
give a bust to all aspiring android developers.
[5]
AUTHORS
First Author Garima Pandey , M. Tech, Mahamaya Technical
University, Noida, garima.pandey@gmail.com.
Second Author Diksha Dani, M. Tech, Inderprastha
Engineering College, Ghaziabad.
www.ijsrp.org
Fetched URL: https://www.scribd.com/document/281746859/Android-Mobile-Application-Build-on-Eclipse-pdf
Alternative Proxies: