Android Mobile Application Build On Ecli
Android Mobile Application Build On Ecli
ISSN 2250-3153
I. INTRODUCTION
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
www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 4, Issue 2, February 2014 3
ISSN 2250-3153
<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" />
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:
www.ijsrp.org