<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7959022648036846246</id><updated>2024-12-18T19:32:18.138-08:00</updated><title type='text'>CODE GLYMPSE</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-4435244319913718406</id><published>2012-10-27T23:10:00.000-07:00</published><updated>2012-11-12T02:18:28.093-08:00</updated><title type='text'>Invoking a Built in Activity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In addition to the user defined activities, an android application contains a number of built-in activities such as browser, contacts, call_&amp;nbsp;dallier&amp;nbsp;etc. In this part we are going to see how to call a&amp;nbsp;built-in&amp;nbsp;activity from your &amp;nbsp;own activity. Like the calling of user defined activities a built in activity is also called using the intent object.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We will start with an example, for that create a new android project and named it as&lt;b&gt; BuiltinApp. &lt;/b&gt;In this project the main.xml file contain two buttons, first one is for invoking the built-in activity&lt;b&gt; browser&lt;/b&gt; and the other one is for&amp;nbsp;&lt;b&gt;dialing&lt;/b&gt;&amp;nbsp;a particular number.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The &lt;b&gt;&lt;i&gt;main.xml&lt;/i&gt;&lt;/b&gt; file for the project is given below.&lt;br /&gt;

&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/div&gt;
&lt;div&gt;
android:layout_width=&quot;fill_parent&quot;&lt;/div&gt;
&lt;div&gt;
android:layout_height=&quot;fill_parent&quot;&lt;/div&gt;
&lt;div&gt;
android:orientation=&quot;vertical&quot; &amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;TextView&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;android:text=&quot;@string/hello&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;b&gt;&amp;lt;Button&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:id=&quot;@+id/browser&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:text=&quot;Open Browser&quot; /&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;lt;Button&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:id=&quot;@+id/start_call&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;android:text=&quot;Make a Call&quot; /&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The &lt;b&gt;BuiltinAppActivity.java &lt;/b&gt;file is shown bellow.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div&gt;
package com.codeglympse;&lt;/div&gt;
&lt;div&gt;
import android.app.Activity;&lt;/div&gt;
&lt;div&gt;
import android.content.Intent;&lt;/div&gt;
&lt;div&gt;
import android.net.Uri;&lt;/div&gt;
&lt;div&gt;
import android.os.Bundle;&lt;/div&gt;
&lt;div&gt;
import android.view.View;&lt;/div&gt;
&lt;div&gt;
import android.view.View.OnClickListener;&lt;/div&gt;
&lt;div&gt;
import android.widget.Button;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
public class BultinAppActivity extends Activity {&lt;/div&gt;
&lt;div&gt;
Button b1;&lt;/div&gt;
&lt;div&gt;
Button b2;&lt;/div&gt;
&lt;div&gt;
/** Called when the activity is first created. */&lt;/div&gt;
&lt;div&gt;
@Override&lt;/div&gt;
&lt;div&gt;
public void onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div&gt;
super.onCreate(savedInstanceState);&lt;/div&gt;
&lt;div&gt;
setContentView(R.layout.main);&lt;/div&gt;
&lt;div&gt;
b1 = (Button) findViewById(R.id.browser);&lt;/div&gt;
&lt;div&gt;
b2 = (Button) findViewById(R.id.start_call);&lt;/div&gt;
&lt;div&gt;
b1.setOnClickListener(new OnClickListener()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
@Override&lt;/div&gt;
&lt;div&gt;
public void onClick(View arg0)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
// TODO Auto-generated method stub&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Intent i = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(&quot;http://www.google.com&quot;));&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;startActivity(i);&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;  &lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
});&lt;/div&gt;
&lt;div&gt;
b2.setOnClickListener(new OnClickListener()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
@Override&lt;/div&gt;
&lt;div&gt;
public void onClick(View v) {&lt;/div&gt;
&lt;div&gt;
// TODO Auto-generated method stub&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Intent i = new Intent(android.content.Intent.ACTION_DIAL,Uri.parse(&quot;tel:+571894567&quot;));&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;startActivity(i);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
});&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the above example we call two built in activities, the &lt;b&gt;&amp;nbsp;browser&lt;/b&gt; and &lt;b&gt;dial&lt;/b&gt;. Here we also passing a data to the called activity by using the&lt;b&gt; Uri.parse()&lt;/b&gt; method. That means here the intent object is an used as an action and data pair object.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Intent i = new Intent(android.content.Intent.ACTION_DIAL,Uri.parse(&quot;tel:+571894567&quot;));&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Intent i =new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(&quot;http://www.google.com&quot;));&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
For invoking the built in activities like browser, you have set the &lt;b&gt;android permission&lt;/b&gt; in the &lt;b&gt;androidmanifest.xml&lt;/b&gt; file.The permission is set within the &lt;b&gt;&amp;lt;manifest&amp;gt; &amp;nbsp;&amp;lt;/manifest&amp;gt;&lt;/b&gt; tag in &lt;b&gt;AndroidManifest.xml &lt;/b&gt;file.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;AndroidManifest,xml&lt;/b&gt; file is given bellow.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; package=&quot;com.codeglympse&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;uses-sdk android:minSdkVersion=&quot;8&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;application&lt;br /&gt;
&amp;nbsp; &amp;nbsp;android:icon=&quot;@drawable/ic_launcher&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;android:label=&quot;@string/app_name&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;activity&lt;br /&gt;
&amp;nbsp; &amp;nbsp;android:label=&quot;@string/app_name&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;android:name=&quot;.BultinAppActivity&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;intent-filter &amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/intent-filter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/activity&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;b&gt;&amp;lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; &amp;gt; &amp;lt;/uses-permission&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;lt;uses-permission android:name=&quot;android.permission.CALL_PHONE&quot;&amp;gt; &amp;lt;/uses-permission&amp;gt;&lt;/b&gt;&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output of the project is given bellow.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipGrvXkXkbzu4LeWSexMmKAe0MYUmRh2zK-VglxLThaDNxXjqWg_N7BhP9MTp5xb7mKT9eljZNPoJnBR4xwkdOEpgEJnrRtEEADueuL-gaPJPhVyTAE21VCTxmdyv59OBbkltWJkOUavI/s1600/32.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipGrvXkXkbzu4LeWSexMmKAe0MYUmRh2zK-VglxLThaDNxXjqWg_N7BhP9MTp5xb7mKT9eljZNPoJnBR4xwkdOEpgEJnrRtEEADueuL-gaPJPhVyTAE21VCTxmdyv59OBbkltWJkOUavI/s320/32.jpg&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWgjF6McgefWRAVh6RA45kFo9ymxuPSKrf70OVq_idwD-LTsH_aFQtP6M6DK65LKcu7lCSGozJ9rxgfVoqRMQclHxrAyw5Nyb4V_FIZPoL85tm7kLBKPqxlh3UrW0rKZhDiNlHvdNLYVw/s1600/33.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWgjF6McgefWRAVh6RA45kFo9ymxuPSKrf70OVq_idwD-LTsH_aFQtP6M6DK65LKcu7lCSGozJ9rxgfVoqRMQclHxrAyw5Nyb4V_FIZPoL85tm7kLBKPqxlh3UrW0rKZhDiNlHvdNLYVw/s320/33.jpg&quot; width=&quot;190&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholPsLjAXSWkkRfz9k-aolZoGwXY2yaHSSiMoNmn3_D-JaSUWe79XroF3gSeFwtrXRewdApFrzvfVXc1SAYsjjPJiGIZ0VVaQEAhgGBzyXYjV94w8KxPYPbIcV8P8PswIQWuGDrSOsCO4/s1600/34.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholPsLjAXSWkkRfz9k-aolZoGwXY2yaHSSiMoNmn3_D-JaSUWe79XroF3gSeFwtrXRewdApFrzvfVXc1SAYsjjPJiGIZ0VVaQEAhgGBzyXYjV94w8KxPYPbIcV8P8PswIQWuGDrSOsCO4/s320/34.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/4435244319913718406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/10/invoking-built-in-activity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/4435244319913718406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/4435244319913718406'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/10/invoking-built-in-activity.html' title='Invoking a Built in Activity'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipGrvXkXkbzu4LeWSexMmKAe0MYUmRh2zK-VglxLThaDNxXjqWg_N7BhP9MTp5xb7mKT9eljZNPoJnBR4xwkdOEpgEJnrRtEEADueuL-gaPJPhVyTAE21VCTxmdyv59OBbkltWJkOUavI/s72-c/32.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-937837925242826123</id><published>2012-10-25T23:39:00.001-07:00</published><updated>2012-11-12T02:17:03.734-08:00</updated><title type='text'>Passing data to an Activity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here we are going to see how to invoke an activity by passing a data to it. Passing of data to an activity is by means of attaching the data to the intent object. The steps you have to follow for invoking an activity by sending a data to it are given bellow.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; &amp;nbsp;Create the intent object.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;It is the same step that we &amp;nbsp;already see in the start activity and start activity for result.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Example:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; Intent i = new Intent(&quot;com.codeglympse.SecondActivity&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 2:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;Create an object of the Bundle class&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The Bundle class is the supporting class for passing data to an activity. &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Example:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; Bundle bundle = new Bundle();&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 3:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Adding data to bundle object using putString() method&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Adding the data to the bumdle object by using the method putString().&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Syntax:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;bundle_object.putString(key,value);&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Here key is used for identifying a specific data from a pair of data. you can get a brief idea about it&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from the example provide bellow in this topic.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Example:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; bundle.putString(&quot;name&quot;, &quot;Enter your name&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 4:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp;Attach the Bundle object to the intent by using the method putExtras().&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Example:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; i.putExtras(bundle);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;

&lt;b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&lt;b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Step 5:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; Now start the activity using either startActivity() or startActivityForResult() method.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Step 6:&lt;/b&gt;&lt;br /&gt;
In order&amp;nbsp;to&amp;nbsp;receive&amp;nbsp;the data from the intent&amp;nbsp;object&amp;nbsp;the target activity (called activity) must contains the following code segments.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; &amp;nbsp;(a) &amp;nbsp; &amp;nbsp;Get back the bundle object using the getIntent() . getExtras();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;Example:&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bundle bundle = &amp;nbsp;getIntent().getExtras();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(b) &amp;nbsp; Get the data from the bundle object using getString() method&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;&amp;nbsp; Example:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp;String name = bundle.getString(&quot;Name&quot;); &lt;/b&gt;&amp;nbsp;where &quot;&lt;b&gt;Name&quot;&lt;/b&gt;&amp;nbsp;is the key value.&lt;br /&gt;
&lt;br /&gt;
Consider the following example for more details about the concept. Followings are the codes for the android project&lt;b&gt; PassingData.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) PassingDataActivity.java&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
package com.codeglympse;&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.Toast;&lt;br /&gt;
public class PassingDataActivity extends Activity {&lt;br /&gt;
int request_code =1;&lt;br /&gt;
Button bn;&lt;br /&gt;
&amp;nbsp;/** Called when the activity is first created. */&lt;br /&gt;
&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bn = (Button) findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bn.setOnClickListener(new OnClickListener() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onClick(View arg0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;b&gt;&amp;nbsp;Intent i = new Intent(&quot;com.codeglympse.DataActivity&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;Bundle extras = new Bundle();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;extras.putString(&quot;name&quot;, &quot;Enter your name here&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;i.putExtras(extras);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;startActivityForResult(i, request_code);&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;});&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; public void onActivityResult(int requestcode, int resultcode, Intent data)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;if(requestcode==request_code)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;if(resultcode==RESULT_OK)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Toast.makeText(this,data.getData().toString(), Toast.LENGTH_SHORT).show();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;

&lt;br /&gt;
&lt;b&gt;(2) Code for the called activity (here it is DataActivity.java )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
package com.codeglympse;&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.net.Uri;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.EditText;&lt;br /&gt;
&lt;br /&gt;
public class DataActivity extends Activity{&lt;br /&gt;
Button bn;&lt;br /&gt;
EditText txt;&lt;br /&gt;
String defaultname;&lt;br /&gt;
@Override&lt;br /&gt;
protected void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.onCreate(savedInstanceState);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setContentView(R.layout.data_activity);&lt;br /&gt;
bn = (Button) findViewById(R.id.b2);&lt;br /&gt;
txt = (EditText) findViewById(R.id.editText1);&lt;br /&gt;
&lt;b&gt;Bundle extras = getIntent().getExtras();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;if(extras!=null)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;defaultname=extras.getString(&quot;name&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;txt.setHint(defaultname);&lt;/b&gt;&lt;br /&gt;
bn.setOnClickListener(new OnClickListener() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onClick(View v) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Intent data = new Intent();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;data.setData(Uri.parse(txt.getText().toString()));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setResult(RESULT_OK, data);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;finish();&lt;br /&gt;
}&lt;br /&gt;
});&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
In the above example we use a method &lt;b&gt;setHint ( ), &lt;/b&gt;which is same as setText () except that it is used for providing&amp;nbsp;guidelines&amp;nbsp;for the user. (It is appear in diminished text and when the user begin to fill the text area it will&amp;nbsp;disappear)&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
Here is the output of the project&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9FxMDmDXYJdg0oqTCPmnx2OLukA_LLVgLDgk3vnU1j7uvx3bXJJhOkGu7D4zdRGR2v_X8jNA6xhaZRuwDRuH_jrY9XRlwIfHRoeMilQ_6CRMyQkHl8DcpGMhrBTIjMQDhXZoe-lXy494/s1600/30.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9FxMDmDXYJdg0oqTCPmnx2OLukA_LLVgLDgk3vnU1j7uvx3bXJJhOkGu7D4zdRGR2v_X8jNA6xhaZRuwDRuH_jrY9XRlwIfHRoeMilQ_6CRMyQkHl8DcpGMhrBTIjMQDhXZoe-lXy494/s1600/30.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjkdjdCZYlBxSRAVLz59rTaDJVrcO6EQ4fZ649y4vWWlsD1HBgo6PWDL2xxc_QoBKgiZvT1WXT23GON8maCPMRQ733OTE9XhncUZArwkYwkfonn0HPIxBoe-Ez74d6vJJJMIvW0_70A44/s1600/29.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjkdjdCZYlBxSRAVLz59rTaDJVrcO6EQ4fZ649y4vWWlsD1HBgo6PWDL2xxc_QoBKgiZvT1WXT23GON8maCPMRQ733OTE9XhncUZArwkYwkfonn0HPIxBoe-Ez74d6vJJJMIvW0_70A44/s1600/29.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/937837925242826123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/10/passing-data-to-activity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/937837925242826123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/937837925242826123'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/10/passing-data-to-activity.html' title='Passing data to an Activity'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9FxMDmDXYJdg0oqTCPmnx2OLukA_LLVgLDgk3vnU1j7uvx3bXJJhOkGu7D4zdRGR2v_X8jNA6xhaZRuwDRuH_jrY9XRlwIfHRoeMilQ_6CRMyQkHl8DcpGMhrBTIjMQDhXZoe-lXy494/s72-c/30.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-67561548269725163</id><published>2012-10-22T02:18:00.001-07:00</published><updated>2012-11-12T02:15:42.053-08:00</updated><title type='text'>Invoking An Activity For Result</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
An android application contains number of activities. It is essential to establish the communication between &amp;nbsp;these activities. In android an activity call another one by means of an intent filter. The intent filter is a sub tag of the Activity tag in androidmanifest.xml file.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In an android application an activity can be invoked in any of the following ways.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) Invoking an activity using the startActivity&amp;nbsp;method&amp;nbsp;and&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;(2) Invoking an activity for result using the startActivityForResult method&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the first method an activity calls another activity without expecting any result from it. This is achieved by using just the&lt;b&gt;&lt;i&gt; startActivity() &lt;/i&gt;&lt;/b&gt;method.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the second method the calling activity expects a result from the called activity by invoking it using the&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;startActivityForResult()&lt;/i&gt;&lt;/b&gt; method.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The startActivityForResult method contains two arguments, first one is the intent object and second one is the request_code. The argument request_code is used for identifying the calling activity. The calling activity sends a request_code to the called activity and the called activity returns the result with the same request code. This will help to identify the exact result from the number of activities responding to the calling activity at same time. The request_code is an integer value. If we use -1 for request_code then the startingActivityForResult() will be same as the startActivity()&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Syntax for starting an activity for result as follows.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; &amp;nbsp;startActivityForResult(new Intent(&quot;&quot;), request_code);&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
E.g&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;i&gt; startActivityForResult(&quot;com.codeglympse.SecondActivity&quot;, request_code );&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;In order&lt;/span&gt;&amp;nbsp;to get the result for the called activity, the calling activity must contain the &lt;b&gt;&lt;i&gt;onActivityResult&lt;/i&gt;&lt;/b&gt;&amp;nbsp; method.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; public void onActivityResult(int request_code, int result_code, Intent data)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;Here three arguments are present. The first one is the request_code used for identifying the exact activity responding to the request, second one is the result_code used for the identifying weather it is&lt;b&gt; RESULT_OK or RESULT_CANCELLED &lt;/b&gt;and the final one is the Intent object which contains the attached data from the called activity.&lt;br /&gt;
The sending activity sends the result by means of the intent object with the help of &lt;b&gt;&lt;i&gt;setData&lt;/i&gt;&lt;/b&gt; method.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; &amp;nbsp;intent_obj.setData(Uri.parse(passing_data));&lt;/b&gt;&lt;br /&gt;
The data is returned to the calling activity by using the method &lt;b&gt;setResult. &lt;/b&gt;The setResult method contains two arguments RESULT_OK or RESULT_CANCELLED and the data 0bject.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setResult(RESULT_OK, data_obj);&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
For more details about the startingActivityForResult, consider the following example.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Create a new android project with name &lt;b&gt;ActivityForResult. &lt;/b&gt;In this example we call the second activity &lt;b&gt;&lt;i&gt;SecondActivity&lt;/i&gt;&lt;/b&gt; from the main activity. For that, we place a button in the first activity xml file as shown bellow.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_height=&quot;fill_parent&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:orientation=&quot;vertical&quot; &amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;lt;TextView&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:text=&quot;@string/hello&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;lt;Button&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ndroid:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;GET RESULT&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
Now create a second activity layout &lt;b&gt;&lt;i&gt;second_layout.xml&lt;/i&gt;&lt;/b&gt; and a &lt;b&gt;&lt;i&gt;SecondActivity.java&lt;/i&gt;&lt;/b&gt; class. Place a EditText and a submit button in the second_layout.xml as follows.&lt;br /&gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;lt;EditText&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:id=&quot;@+id/editText1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;requestFocus /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/EditText&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;lt;Button&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:text=&quot;submit&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;/div&gt;
In order to&amp;nbsp;receive&amp;nbsp;the result, the calling activity must contain the method&amp;nbsp;&lt;b&gt;&lt;i&gt;onActivityResult()&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/i&gt;public void onActivityResult(int request_code, int resultcode, Intent data)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The ActivityForResultActivity.java file is shown bellow.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;package com.codeglumpse;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.content.Intent;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.view.View;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.view.View.OnClickListener;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.widget.Button;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import android.widget.Toast;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public class ActivityForResultActivity extends Activity {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Button bn;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: blue; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;int requestcode=1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;/** Called when the activity is first created. */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;setContentView(R.layout.main);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;bn = (Button) findViewById(R.id.button1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;bn.setOnClickListener(new OnClickListener() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onClick(View arg0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;// TODO Auto-generated method stub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Intent i = new Intent(&quot;com.codeglympse.SecondActivity&quot;)&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;startActivityForResult(i,requestcode);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public void onActivityResult(int request_code, int resultcode, Intent data)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(request_code==requestcode)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: blue; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;if(resultcode==RESULT_OK)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Toast.makeText(this, &quot;Welcome &quot;+data.getData().toString(), Toast.LENGTH_SHORT).show();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;

The SecondActivity.java is as follows.&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;package com.codeglumpse;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.content.Intent;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.net.Uri;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.view.View;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.view.View.OnClickListener;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.widget.Button;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;import android.widget.EditText;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public class SecondActivity extends Activity{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;// TODO Auto-generated method stub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;setContentView(R.layout.second_layout);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Button bn = (Button) findViewById(R.id.submit);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;bn.setOnClickListener(new OnClickListener() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;background-color: white; white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public void onClick(View arg0) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;// TODO Auto-generated method stub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Intent data &amp;nbsp;= new Intent();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EditText tx = (EditText) findViewById(R.id.editText1);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;data.setData(Uri.parse(tx.getText().toString()));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;setResult(RESULT_OK,data);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;finish();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

&lt;span style=&quot;background-color: white;&quot;&gt;Here is the editing done in the &lt;b&gt;&lt;i&gt;AndroidManifest.xml&lt;/i&gt;&lt;/b&gt; file.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;package=&quot;com.codeglumpse&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;android:versionCode=&quot;1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;android:versionName=&quot;1.0&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;8&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;android:icon=&quot;@drawable/ic_launcher&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;android:label=&quot;@string/app_name&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;activity&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;android:label=&quot;@string/app_name&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;android:name=&quot;.ActivityForResultActivity&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;intent-filter &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:label=&quot;@string/second&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; android:name=&quot;.SecondActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;com.codeglympse.SecondActivity&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the output of the project&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxOL5PudO7xRPjCBwaznkDs49IVr8zJvorSyPg_53CsavJ_QMyYdrxdAeVdIDc5d1A1kPBQOyRhCnNR0_VfSB468nOlRK_4NSkfYY5drc8MrBLTzyA9RbtkRiXZX7FsCsCkrnocqToa4/s1600/26.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxOL5PudO7xRPjCBwaznkDs49IVr8zJvorSyPg_53CsavJ_QMyYdrxdAeVdIDc5d1A1kPBQOyRhCnNR0_VfSB468nOlRK_4NSkfYY5drc8MrBLTzyA9RbtkRiXZX7FsCsCkrnocqToa4/s1600/26.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZE118PeCZ3Y4f_APmTXQprupi7S0h6DGjlwpgNHShjQxKIfJzJdcO1-fGo9Vx8pgJCgKf-ixCdZemYgakwLEwaaoKbhUiy7nCS53-MpXvz-5uEbZmamEzurmwHK8O0OlUEzWd6MMhN8A/s1600/27.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZE118PeCZ3Y4f_APmTXQprupi7S0h6DGjlwpgNHShjQxKIfJzJdcO1-fGo9Vx8pgJCgKf-ixCdZemYgakwLEwaaoKbhUiy7nCS53-MpXvz-5uEbZmamEzurmwHK8O0OlUEzWd6MMhN8A/s1600/27.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxOL5PudO7xRPjCBwaznkDs49IVr8zJvorSyPg_53CsavJ_QMyYdrxdAeVdIDc5d1A1kPBQOyRhCnNR0_VfSB468nOlRK_4NSkfYY5drc8MrBLTzyA9RbtkRiXZX7FsCsCkrnocqToa4/s1600/26.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxOL5PudO7xRPjCBwaznkDs49IVr8zJvorSyPg_53CsavJ_QMyYdrxdAeVdIDc5d1A1kPBQOyRhCnNR0_VfSB468nOlRK_4NSkfYY5drc8MrBLTzyA9RbtkRiXZX7FsCsCkrnocqToa4/s1600/26.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/67561548269725163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/10/invoking-activity-for-result.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/67561548269725163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/67561548269725163'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/10/invoking-activity-for-result.html' title='Invoking An Activity For Result'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTxOL5PudO7xRPjCBwaznkDs49IVr8zJvorSyPg_53CsavJ_QMyYdrxdAeVdIDc5d1A1kPBQOyRhCnNR0_VfSB468nOlRK_4NSkfYY5drc8MrBLTzyA9RbtkRiXZX7FsCsCkrnocqToa4/s72-c/26.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-8464103902533023441</id><published>2012-10-01T02:49:00.002-07:00</published><updated>2012-11-12T01:58:14.516-08:00</updated><title type='text'>Installing Eclipse And Android SDK</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
For preparing your computer for android&amp;nbsp;development&amp;nbsp;you need the following software packages.&lt;br /&gt;
&lt;strong&gt;(1) Java development kit (jdk).&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;(2) Eclipse IDE&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;(3) Android Development tool (ADT) for Eclipse&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;(4) Android software Development Kit (SDK).&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Install Java Development Kit:&lt;/strong&gt;&lt;br /&gt;
First you have to download the java development kit. Select the correct version such as&amp;nbsp;OS&amp;nbsp;(Windows, Linux, Solaris, Mac) and type of OS (32 bit or 64 bit). Install the package. You can download the jdk from the following link.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&amp;nbsp; &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html&quot; target=&quot;_blank&quot;&gt;Jdk download&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Installing Eclipse IDE:&lt;/strong&gt;&lt;br /&gt;
Eclipse is the recommended IDE for android development.&amp;nbsp;Like jdk you can download it free from the&amp;nbsp;eclipse official website. Select the appropriate version. I recommend Eclipse classic version. You can download Eclipse from the following link.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.eclipse.org/downloads/&quot; target=&quot;_blank&quot;&gt;Eclipse download&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After the successful download extract the files into any location. You get a folder named eclipse, open it and double click the icon named &quot;&lt;b&gt;&lt;i&gt;eclipse&lt;/i&gt;&lt;/b&gt;&quot;. Now you get the eclipse IDE main window. &lt;br /&gt;
&lt;strong&gt;Installing ADT for Eclipse:&lt;/strong&gt;&lt;br /&gt;
Now click the &lt;b&gt;&lt;i&gt;help&lt;/i&gt;&lt;/b&gt; tab and select &quot;&lt;b&gt;&lt;i&gt;Install New Software&lt;/i&gt;&lt;/b&gt;&quot; option.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JHQlRTj1yV9wNik5aFOaxgVeMM-S4k5KPOLmUKejtKaPtZ-ew2_pdZXXEZpD6YtmjlSIMM0U0Vlr7N-pwg-QKh0a_LINfTn_evZgAWj8V4k7u_mD2GualtGmenXUJrfNS-YZ_qgBbp4/s1600/4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JHQlRTj1yV9wNik5aFOaxgVeMM-S4k5KPOLmUKejtKaPtZ-ew2_pdZXXEZpD6YtmjlSIMM0U0Vlr7N-pwg-QKh0a_LINfTn_evZgAWj8V4k7u_mD2GualtGmenXUJrfNS-YZ_qgBbp4/s1600/4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsHo2JLogwqwJxNTXft7YngGsmTMAmFf6bEJmTNZ13k4hxwexZTzyBR4DnxjmgSVC37WLqjYwfYG5MF4In2Zdd-Wd6DY3shicNaXHDkVgbzcZr0OTlXDsIwUvCDqRZVpycdEBBNaso1HE/s1600/5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsHo2JLogwqwJxNTXft7YngGsmTMAmFf6bEJmTNZ13k4hxwexZTzyBR4DnxjmgSVC37WLqjYwfYG5MF4In2Zdd-Wd6DY3shicNaXHDkVgbzcZr0OTlXDsIwUvCDqRZVpycdEBBNaso1HE/s1600/5.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go to android&amp;nbsp;developer&amp;nbsp;site and copy the&amp;nbsp;URL&amp;nbsp;for eclipse plugin. You can use the&amp;nbsp;flowing&amp;nbsp;link for getting the eclipse plugin.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://developer.android.com/sdk/installing/installing-adt.html&quot; target=&quot;_blank&quot;&gt; Eclipse Plugin&lt;/a&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
or You can copy it from here&lt;b&gt; &quot;&lt;/b&gt;&lt;span class=&quot;pln&quot; style=&quot;font-family: &#39;courier new&#39;, courier, monospace; font-size: 14px; line-height: 1.5;&quot;&gt;https&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600; font-family: &#39;courier new&#39;, courier, monospace; font-size: 14px; line-height: 1.5;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000; font-family: &#39;courier new&#39;, courier, monospace; font-size: 14px; line-height: 1.5;&quot;&gt;//dl-ssl.google.com/android/eclipse/&lt;/span&gt;&lt;b&gt;&quot;. &lt;/b&gt;Paste this to the &lt;b&gt;&lt;i&gt;work with&lt;/i&gt;&lt;/b&gt; option and expand the &lt;i&gt;&lt;b&gt;D&lt;/b&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;eveloper&amp;nbsp;tools&lt;/i&gt;&lt;/b&gt; option and tick it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja0-7xd2R1vr9OaNuyU096kF3EwSFNq9cWdXdHJFjrFvIfZDwSKZ6VutFJzhI9QfR3RnL1v42Ia2DWjY5R8fHWpXxqLpfBp4ti5shgXWW9vF0MHWPzlUM7ZgIzraAGndpZxZVc-O4xVuU/s1600/59.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja0-7xd2R1vr9OaNuyU096kF3EwSFNq9cWdXdHJFjrFvIfZDwSKZ6VutFJzhI9QfR3RnL1v42Ia2DWjY5R8fHWpXxqLpfBp4ti5shgXWW9vF0MHWPzlUM7ZgIzraAGndpZxZVc-O4xVuU/s1600/59.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now press the&lt;b&gt;&lt;i&gt; next&lt;/i&gt;&lt;/b&gt; button and continue the installation according to the instructions from the installer window.&lt;br /&gt;
&lt;b&gt;Installing Android SDK:&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now we are going to install the the android sdk. For that open the &lt;b&gt;&lt;i&gt;window &lt;/i&gt;&lt;/b&gt;tab in eclipse ide and choose the &lt;b&gt;&lt;i&gt;Android SDK Manager&lt;/i&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2J2gNm1hRi6TYu4J-BOFGZa96mMniXmKRHrYoJu4Jp-uoCAn4pDrYNmJm9vNn4uzz-IvRzPPUW1HN4aM6wIAeUNIveeJvvnqCE64ZX-X2Ny1yt0lFeIa7E2mB37pVoDmxM94H6pMd6bk/s1600/21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2J2gNm1hRi6TYu4J-BOFGZa96mMniXmKRHrYoJu4Jp-uoCAn4pDrYNmJm9vNn4uzz-IvRzPPUW1HN4aM6wIAeUNIveeJvvnqCE64ZX-X2Ny1yt0lFeIa7E2mB37pVoDmxM94H6pMd6bk/s1600/21.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Install all the required packages form the Android SDK Manager window.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8zUX5uWYHuYvaIl5hBczJd5g7EvAEQA32sE07PTqU-IkEFVXuqSTY21TcFahduboDwxBcMU08glT_MSgDEkgBqWv1pq6iWT9Q-vJ5ZFd25RSQTaFgue2zEppQbKBoSVELlRFic3nxw88/s1600/22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8zUX5uWYHuYvaIl5hBczJd5g7EvAEQA32sE07PTqU-IkEFVXuqSTY21TcFahduboDwxBcMU08glT_MSgDEkgBqWv1pq6iWT9Q-vJ5ZFd25RSQTaFgue2zEppQbKBoSVELlRFic3nxw88/s400/22.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;Creating the AVD:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Now its time for creating the AVD for testing your android projects. An AVD is nothing but a virtual android phone or tab&amp;nbsp;environment&amp;nbsp;for testing the android apps you created.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
For creating an AVD select the window tab and choose the AVD Manager option in eclipse IDE.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYryDCfRKrwIGpIY5grKWR41TdL1Lb2jxp4sT_JIwpiTakrI4M_5KaDvpJW3xlE1h56dIcG6zgnx9EybAcdNlpTIgOaKXZyiamJzhESjR8vvWUF4N8dn9UtInLk38qG4sQo7zwNyJKRFQ/s1600/23.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYryDCfRKrwIGpIY5grKWR41TdL1Lb2jxp4sT_JIwpiTakrI4M_5KaDvpJW3xlE1h56dIcG6zgnx9EybAcdNlpTIgOaKXZyiamJzhESjR8vvWUF4N8dn9UtInLk38qG4sQo7zwNyJKRFQ/s1600/23.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Select the &lt;b&gt;&lt;i&gt;new&lt;/i&gt;&lt;/b&gt; button and you got a new window named C&lt;b&gt;&lt;i&gt;reate new Android Virtual Device &lt;/i&gt;(AVD).&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Provide any appropriate&lt;b&gt;&lt;i&gt; name&lt;/i&gt;&lt;/b&gt; for your AVD, choose the &lt;b&gt;&lt;i&gt;Target&lt;/i&gt;&lt;/b&gt; and&amp;nbsp;specifie the &lt;b style=&quot;font-style: italic;&quot;&gt;SD card memory size &lt;/b&gt;and click the&lt;b style=&quot;font-style: italic;&quot;&gt; Create AVD &lt;/b&gt;button. Here i give the name as &lt;b&gt;&lt;i&gt;MyVirtualPhone&lt;/i&gt;&lt;/b&gt;, choose &lt;b&gt;&lt;i&gt;API level 8&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;SD&lt;/i&gt;&lt;/b&gt; &lt;b&gt;&lt;i&gt;card size 1024 MiB&lt;/i&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4dIkXehbWaN4Ohw75lFq8YVW1FYoXHMEAmKj6dSwmnPDSHRll27EdzoBSme_9YZfcfWBYT0sau918bckvhIBvediY-BPq8kcm7tiHArWq6VS6d_XrDEjWWvWxlGjWtlp3Yggc2XRIo0o/s1600/24.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4dIkXehbWaN4Ohw75lFq8YVW1FYoXHMEAmKj6dSwmnPDSHRll27EdzoBSme_9YZfcfWBYT0sau918bckvhIBvediY-BPq8kcm7tiHArWq6VS6d_XrDEjWWvWxlGjWtlp3Yggc2XRIo0o/s1600/24.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Now start the AVD using the &lt;b&gt;&lt;i&gt;start&lt;/i&gt;&lt;/b&gt; and&lt;b&gt;&lt;i&gt; launch&lt;/i&gt;&lt;/b&gt; buttons and you will get the following AVD&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRpnPslzOjE6OPh5dTx8Lv_OSzAGRSod65KU2S6O1Y_t1so8IDCvT1sxm19UGIjZaC1rMsyWI6y-zJgjdPf392vbZ1lE3ywLrCZ0D18cZBUpZ0LxmczJ9oX0u0EQFvMbyZJRT0-U5FjDs/s1600/25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRpnPslzOjE6OPh5dTx8Lv_OSzAGRSod65KU2S6O1Y_t1so8IDCvT1sxm19UGIjZaC1rMsyWI6y-zJgjdPf392vbZ1lE3ywLrCZ0D18cZBUpZ0LxmczJ9oX0u0EQFvMbyZJRT0-U5FjDs/s400/25.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/8464103902533023441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/10/installing-eclipse-and-android-sdk.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/8464103902533023441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/8464103902533023441'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/10/installing-eclipse-and-android-sdk.html' title='Installing Eclipse And Android SDK'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JHQlRTj1yV9wNik5aFOaxgVeMM-S4k5KPOLmUKejtKaPtZ-ew2_pdZXXEZpD6YtmjlSIMM0U0Vlr7N-pwg-QKh0a_LINfTn_evZgAWj8V4k7u_mD2GualtGmenXUJrfNS-YZ_qgBbp4/s72-c/4.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-7104445678554465324</id><published>2012-09-26T02:52:00.003-07:00</published><updated>2012-11-12T02:12:45.094-08:00</updated><title type='text'>Inheritance in java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;

&lt;br /&gt;
Inheritance is one of the major object oriented concepts in java, in which the object of one class shows the properties of another class. In&amp;nbsp;other words&amp;nbsp;we can say that inheritance is the relationships between classes. Consider the following example.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Here DRAW_SHAPE is a class, DRAW_CIRCLE and DRAW_ RECTANGLE are another two classes. All we know that Rectangle and Circles are basically coming under the category Shape. &amp;nbsp;That means if we create an object of the class DRAW_ CIRCLE or DRAW_ RECTANGLE it is possible to access all the members of the class SHAPE using that object. Or we can say that SHAPE is the super class or parent class of the two classes DRAW_ RECTANGLE and DRAW SHAPE.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVQWbcDEFIy5T7RFs4xOOPWSCXoRdwhIdPl5hnLfRfMsAKdmiLJO4TyiN4S-4b9O_VSOOMMmUqRozcXhqx5YLCH5x_3IUiKdWlNY5P8kR_xObgiYHn3KCb8XteUKqhi7SuFfxg-BuxigU/s1600/19.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVQWbcDEFIy5T7RFs4xOOPWSCXoRdwhIdPl5hnLfRfMsAKdmiLJO4TyiN4S-4b9O_VSOOMMmUqRozcXhqx5YLCH5x_3IUiKdWlNY5P8kR_xObgiYHn3KCb8XteUKqhi7SuFfxg-BuxigU/s1600/19.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In java the &quot;&lt;i style=&quot;font-weight: bold;&quot;&gt;extends&quot; &lt;/i&gt;keyword is used for inheritance. All the child classes &amp;nbsp;extends the parent class. The parent class is also called the&lt;b&gt;&lt;i&gt; super class&lt;/i&gt;&lt;/b&gt;. The&amp;nbsp;programmatic view of the above example is given bellow.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;class DRAW_SHAPE&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class DRAW_CIRCLE extends DRAW_SHAPE&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class DRAW_REACTNGLE extends DRAW_SHAPE&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;

Consider the following example to know more about inheritance in java&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#ADD8E6&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;background-color: transparent; text-align: justify;&quot;&gt;&lt;b&gt;&amp;nbsp;class DrawShape&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String shape;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DrawShape(String shape)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;this.shape = shape;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String finishDrawing()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return &quot;Drawing of &quot;+shape+&quot; success&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; class DrawCircle extends DrawShape&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DrawCircle(String shape)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(shape);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String draw()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;Drawing of circle started&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;class DrawRectangle extends DrawShape&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DrawRectangle(String shape)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(shape);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String draw()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;Drawing of rectangle started&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public class DrawingDemo&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String args[])&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DrawCircle circle = new DrawCircle(&quot;Circle&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DrawRectangle rectangle = new DrawRectangle(&quot;Rectangle&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(circle.draw());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(rectangle.draw());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(circle.finishDrawing());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;System.out.println(rectangle.finishDrawing());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;br /&gt;
&lt;br /&gt;
Here is the output of the program:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqr9YQv67TVIy1H0rKcbofB5hjhEyHjhOz8kPFOMejVozZ219CYJcIGyYvCjrl8oxb9DO8hpju-Dj48cq1eJUQvvgNv90NkQE4gIC9gvDn7IC12oFuvfjdON_A5SuSoB_8PC0fe9pgl9k/s1600/20.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqr9YQv67TVIy1H0rKcbofB5hjhEyHjhOz8kPFOMejVozZ219CYJcIGyYvCjrl8oxb9DO8hpju-Dj48cq1eJUQvvgNv90NkQE4gIC9gvDn7IC12oFuvfjdON_A5SuSoB_8PC0fe9pgl9k/s1600/20.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/7104445678554465324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/09/inheritance-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/7104445678554465324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/7104445678554465324'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/09/inheritance-in-java.html' title='Inheritance in java'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVQWbcDEFIy5T7RFs4xOOPWSCXoRdwhIdPl5hnLfRfMsAKdmiLJO4TyiN4S-4b9O_VSOOMMmUqRozcXhqx5YLCH5x_3IUiKdWlNY5P8kR_xObgiYHn3KCb8XteUKqhi7SuFfxg-BuxigU/s72-c/19.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-2098434258824642561</id><published>2012-09-22T02:21:00.000-07:00</published><updated>2012-11-12T02:07:17.844-08:00</updated><title type='text'>MULTIPLE ACTIVITY</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;


Now we are going to discuss about how to handle multiple activities in an android app. I explain it with an example.Open the eclipse IDE and start a new project with name &lt;strong&gt;&lt;em&gt;MultipleActivityApp&lt;/em&gt;&lt;/strong&gt;.&lt;br /&gt;
&lt;strong&gt;Create the layout for second Activity:&lt;/strong&gt;&lt;br /&gt;
Expand the &lt;strong&gt;&lt;em&gt;layout&lt;/em&gt;&lt;/strong&gt; folder in &lt;strong&gt;&lt;em&gt;res&lt;/em&gt;&lt;/strong&gt; folder and right click the &lt;strong&gt;&lt;em&gt;layout&lt;/em&gt;&lt;/strong&gt; folder select &lt;strong&gt;&lt;em&gt;other&lt;/em&gt;&lt;/strong&gt; option&amp;nbsp;and select the new &lt;strong&gt;&lt;em&gt;Android&amp;nbsp;XML file&lt;/em&gt;&lt;/strong&gt;.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDpMujmpQ7s_07OAuNISSVOOIRziPRi_KKxz2495Wx1X_ZMHibaRB6JFXjHpH_Tx3QCihVhQEeRmR1iVUJZCZBewITe6vOpQIcnGBvia6-qAqVFl5NHZE0qv-LTy_SegDYfT86s0vSwrA/s1600/15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDpMujmpQ7s_07OAuNISSVOOIRziPRi_KKxz2495Wx1X_ZMHibaRB6JFXjHpH_Tx3QCihVhQEeRmR1iVUJZCZBewITe6vOpQIcnGBvia6-qAqVFl5NHZE0qv-LTy_SegDYfT86s0vSwrA/s1600/15.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4KnKxypil1pYHTVB_WMzCNG65aZe8-GRCOfQ0TxmMlCML532nHR8zsxddzE3vXTI9xzWCuFfGVdrJ_QH98Wmxh5uR9hF113tS8VdCFQ1xQjIkVkGJCOkKJI5U6T3wLRkPB8d-XV_XUrE/s1600/16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4KnKxypil1pYHTVB_WMzCNG65aZe8-GRCOfQ0TxmMlCML532nHR8zsxddzE3vXTI9xzWCuFfGVdrJ_QH98Wmxh5uR9hF113tS8VdCFQ1xQjIkVkGJCOkKJI5U6T3wLRkPB8d-XV_XUrE/s1600/16.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
Name the file as &lt;strong&gt;&lt;em&gt;second_layout&lt;/em&gt;&lt;/strong&gt;.(It is necessory to name all the XML files in small letters) and click &lt;strong&gt;&lt;em&gt;finish. &lt;/em&gt;&lt;/strong&gt;Edit the &lt;strong&gt;&lt;em&gt;second_layout.xml&lt;/em&gt;&lt;/strong&gt; as shown bellow.&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#add8e6&quot; border=&quot;1&quot;&gt; &lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&amp;lt;?xml version=&lt;i&gt;&quot;1.0&quot;&lt;/i&gt;
encoding=&lt;i&gt;&quot;utf-8&quot;&lt;/i&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&lt;i&gt;&lt;a href=&quot;http://schemas.android.com/apk/res/android&quot;&gt;http://schemas.android.com/apk/res/android&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:layout_width=&lt;i&gt;&quot;match_parent&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:layout_height=&lt;i&gt;&quot;match_parent&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:orientation=&lt;i&gt;&quot;vertical&quot;&lt;/i&gt;
&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;TextView&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:id=&lt;i&gt;&quot;@+id/textView1&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:layout_width=&lt;i&gt;&quot;match_parent&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:layout_height=&lt;i&gt;&quot;wrap_content&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;android:text=&lt;i&gt;&quot;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;HELLO FROM SECOND ACTIVITY&lt;/b&gt;&quot;&lt;/i&gt; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; line-height: 115%; mso-themecolor: text1;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 10pt; line-height: 115%; mso-themecolor: text1;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Create the Activity:&lt;/strong&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Expand the project folder and expand the folder with name &lt;strong&gt;&lt;em&gt;src.&lt;/em&gt;&lt;/strong&gt; Right click the package (here it is &lt;strong&gt;&lt;em&gt;com.codeglympse&lt;/em&gt;&lt;/strong&gt;) select new &lt;strong&gt;&lt;em&gt;class&lt;/em&gt;(&lt;em&gt; &lt;/em&gt;&lt;/strong&gt;if the&lt;strong&gt;&lt;em&gt; class &lt;/em&gt;&lt;/strong&gt;option&lt;strong&gt;&lt;em&gt; &lt;/em&gt;&lt;/strong&gt;is not found then select the &lt;em&gt;&lt;strong&gt;other&lt;/strong&gt;&lt;/em&gt; option and select the &lt;strong&gt;&lt;em&gt;class&lt;/em&gt;&lt;/strong&gt;)&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCfK0NJ1gvjF7b3jCKx3l3PPfUhIha1y0bduaWxv7rn7NfwwCfNOljpKIUtdcTETRdtpbkm3PnnEOYF6gb1N9YI7mp8su1CIV-M4u3j3vs9HVQSL1BH9CiS57Epm7zAKh3iR7AN6spSF0/s1600/14.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCfK0NJ1gvjF7b3jCKx3l3PPfUhIha1y0bduaWxv7rn7NfwwCfNOljpKIUtdcTETRdtpbkm3PnnEOYF6gb1N9YI7mp8su1CIV-M4u3j3vs9HVQSL1BH9CiS57Epm7zAKh3iR7AN6spSF0/s1600/14.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Name&amp;nbsp; the class as &lt;strong&gt;&lt;em&gt;SecondActivity&lt;/em&gt;&lt;/strong&gt; and click&lt;strong&gt;&lt;em&gt; finish.&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjXayMMuiBriTWYeo_GabtrcKn3eHZf1WFK8AQDIscQSCsCYD_63hgbLSTWFNJAmX5nFEjOajuY3oy7olT0oac6Y9sJjTHybc8TjP5BzsLsq-P3DeuEw_qNqBuBaJpMtSkysKxTG39n9s/s1600/13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjXayMMuiBriTWYeo_GabtrcKn3eHZf1WFK8AQDIscQSCsCYD_63hgbLSTWFNJAmX5nFEjOajuY3oy7olT0oac6Y9sJjTHybc8TjP5BzsLsq-P3DeuEw_qNqBuBaJpMtSkysKxTG39n9s/s1600/13.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now make the &lt;strong&gt;&lt;em&gt;SecondActivity.java&lt;/em&gt;&lt;/strong&gt; file extends the &lt;strong&gt;&lt;em&gt;Activity&lt;/em&gt;&lt;/strong&gt; class and link the layout and activity class of the second activity using the statement&lt;strong&gt;&lt;em&gt; setContentView(R.layout.second_layout). &lt;/em&gt;&lt;/strong&gt;Here the &lt;strong&gt;&lt;em&gt;second_layout&lt;/em&gt;&lt;/strong&gt; is the name of the XML file which we have already created. &lt;strong&gt;&lt;em&gt;SecondActivity.java&lt;/em&gt;&lt;/strong&gt; file is shown below&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#ADD8E6&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;
com.codeglympse;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;
android.app.Activity;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;
android.os.Bundle;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;
&lt;b&gt;class&lt;/b&gt; SecondActivity &lt;b&gt;extends&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;
Activity&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;@Override&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;protected&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt; &lt;span style=&quot;mso-bidi-font-weight: bold;&quot;&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;//
&lt;span style=&quot;mso-bidi-font-weight: bold;&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-bidi-font-weight: bold;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;setContentView(R.layout.&lt;i&gt;second_layout&lt;/i&gt;);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;}&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt; mso-themecolor: text1;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;/div&gt;
Add a button with&lt;b&gt;&lt;i&gt;&amp;nbsp;id &#39;b&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;b&gt;n&#39;&amp;nbsp;&lt;/b&gt;&lt;/i&gt;and &lt;b&gt;&lt;i&gt;text&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&#39;&lt;b&gt;&lt;i&gt;NEXT ACTIVITY&#39;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;in the&lt;i style=&quot;font-weight: bold;&quot;&gt; main.xml &lt;/i&gt;as shown bellow.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#ADD8E6&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;lt;?xml version=&lt;/span&gt;&lt;i style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;1.0&quot;&lt;/i&gt;&lt;span style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt;
encoding=&lt;/span&gt;&lt;i style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;utf-8&quot;&lt;/i&gt;&lt;span style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&lt;i&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&lt;i&gt;&quot;fill_parent&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&lt;i&gt;&quot;fill_parent&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:orientation=&lt;i&gt;&quot;vertical&quot;&lt;/i&gt;
&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&lt;i&gt;&quot;fill_parent&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&lt;i&gt;&quot;wrap_content&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text=&lt;i&gt;&quot;HELLO FROM MAIN
ACTIVITY&quot;&lt;/i&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Button&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id=&lt;i&gt;&quot;@+id/bn&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&lt;i&gt;&quot;148dp&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&lt;i&gt;&quot;wrap_content&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text=&lt;i&gt;&quot;NEXT
ACTIVITY&quot;&lt;/i&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
Now go to the &lt;b&gt;&lt;i&gt;MultipleActivity.java&lt;/i&gt;&lt;/b&gt; file and create an&lt;b&gt;&lt;i&gt; intent&lt;/i&gt;&lt;/b&gt; for the new activity in the&lt;b&gt;&lt;i&gt; onClickListener&lt;/i&gt;&lt;/b&gt; of the button.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Intent
in = &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;Intent(getApplicationContext(),SecondActivity.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;startActivity(in);&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp; &amp;nbsp; MultipleActivity.java is shown bellow&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#ADD8E6&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; com.codeglympse;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.app.Activity;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.content.Intent;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.os.Bundle;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; android.view.View;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.view.View.OnClickListener;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;import&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
android.widget.Button;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; MultipleActivity &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;extends&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; Activity {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;/**
Called when the activity is first created. */&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; onCreate(Bundle
savedInstanceState) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;super&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;.onCreate(savedInstanceState);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
setContentView(R.layout.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;main&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Button bn = (Button) findViewById(R.id.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-family: Consolas; font-size: 10.0pt;&quot;&gt;bn&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
bn.setOnClickListener(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; OnClickListener() {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #646464; font-family: Consolas; font-size: 10.0pt;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt; onClick(View arg0) {&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;// &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f9fbf; font-family: Consolas; font-size: 10.0pt;&quot;&gt;TODO&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;&quot;&gt; Auto-generated
method stub&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intent
in = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;
Intent(getApplicationContext(),SecondActivity.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: Consolas; font-size: 10.0pt;&quot;&gt;class&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startActivity(in);&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Now open the &lt;b&gt;&lt;i&gt;AndroidManifest.xml&lt;/i&gt;&lt;/b&gt; and specify the Second Activity name there.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #002060; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activity&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #002060; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:label=&lt;i&gt;&quot;@string/app_name&quot;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #002060; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:name=&lt;i&gt;&quot;.SecondActivity&quot;&lt;/i&gt;
&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #002060; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #002060;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The&lt;b&gt;&lt;i&gt; AndroidManifest.xml &lt;/i&gt;&lt;/b&gt;file is shown below.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table bgcolor=&quot;#ADD8E6&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;background-color: transparent; color: teal; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3f7f7f; font-family: Consolas; font-size: 10pt;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-family: Consolas; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;version&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: #7f007f;&quot;&gt;encoding&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: teal;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;manifest&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;xmlns:android&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;package&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;com.codeglympse&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:versionCode&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:versionName&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/i&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;uses-sdk&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:minSdkVersion&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;8&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;application&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:icon&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@drawable/ic_launcher&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:label&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;&lt;/i&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;activity&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:label&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:name&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;.MultipleActivity&quot;&lt;/span&gt;&lt;/i&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;intent-filter&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:name&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;android.intent.action.MAIN&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;category&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:name&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;color: teal;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;intent-filter&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;activity&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;activity&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:label&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #7f007f;&quot;&gt;android:name&lt;/span&gt;=&lt;i&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;.SecondActivity&quot;&lt;/span&gt;&lt;/i&gt; &lt;span style=&quot;color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;activity&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;&quot;&gt;application&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;manifest&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: 10.0pt; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;o:p&gt;&lt;/o:p&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Run the application and you got the following output.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjUgKQmCCN5igqDo0Xlbse6e5pCPPBCCSNsCH8mPeZ0H8b1LeHeWbYHONV7efFW9QUxFFpcVNfNhwdNHkcrgDH057LtzerOTXtnU-dqGykGLwDzGRVPQa_LXglSlev7D7lClZZOA1cHfg/s1600/17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjUgKQmCCN5igqDo0Xlbse6e5pCPPBCCSNsCH8mPeZ0H8b1LeHeWbYHONV7efFW9QUxFFpcVNfNhwdNHkcrgDH057LtzerOTXtnU-dqGykGLwDzGRVPQa_LXglSlev7D7lClZZOA1cHfg/s1600/17.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1dfIdiTPTwuVjqWv6Dxq43SQaKYKrR2Nt_VdXYtgOVBP5SPnlzr6UYMyTxdnYvzBEDLTFiMeaXuNVNiELa5OUQF8wgamszff9zBxTr_82l_kp6cyRu2FUvKSU0ag9LC1sDZ6-1T8TZR8/s1600/18.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1dfIdiTPTwuVjqWv6Dxq43SQaKYKrR2Nt_VdXYtgOVBP5SPnlzr6UYMyTxdnYvzBEDLTFiMeaXuNVNiELa5OUQF8wgamszff9zBxTr_82l_kp6cyRu2FUvKSU0ag9LC1sDZ6-1T8TZR8/s1600/18.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table bgcolor=&quot;&quot; border=&quot;1&quot;&gt;

























&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;

&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/2098434258824642561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/09/multiple-activity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/2098434258824642561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/2098434258824642561'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/09/multiple-activity.html' title='MULTIPLE ACTIVITY'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDpMujmpQ7s_07OAuNISSVOOIRziPRi_KKxz2495Wx1X_ZMHibaRB6JFXjHpH_Tx3QCihVhQEeRmR1iVUJZCZBewITe6vOpQIcnGBvia6-qAqVFl5NHZE0qv-LTy_SegDYfT86s0vSwrA/s72-c/15.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-8426709328169574635</id><published>2012-09-17T04:16:00.002-07:00</published><updated>2012-11-12T01:55:42.565-08:00</updated><title type='text'>Android Versions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;

&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdva3GOyoDSFww09iewj23G2aXCzsKoLM0QD_87sOBZyUHkW381Azz_F3iCFA5RnQ-P2_X8HH_1Cl0DZgE7MlyQy9cVS4OOeQLInbSoCvT7Yp2SdMqG3TV2vsdv-njiuDCQagK-Lcg5X8/s1600/versions.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdva3GOyoDSFww09iewj23G2aXCzsKoLM0QD_87sOBZyUHkW381Azz_F3iCFA5RnQ-P2_X8HH_1Cl0DZgE7MlyQy9cVS4OOeQLInbSoCvT7Yp2SdMqG3TV2vsdv-njiuDCQagK-Lcg5X8/s1600/versions.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Android available Versions&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;

&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/8426709328169574635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/09/android-versions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/8426709328169574635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/8426709328169574635'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/09/android-versions.html' title='Android Versions'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdva3GOyoDSFww09iewj23G2aXCzsKoLM0QD_87sOBZyUHkW381Azz_F3iCFA5RnQ-P2_X8HH_1Cl0DZgE7MlyQy9cVS4OOeQLInbSoCvT7Yp2SdMqG3TV2vsdv-njiuDCQagK-Lcg5X8/s72-c/versions.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-7847631443229058256</id><published>2012-09-17T04:04:00.001-07:00</published><updated>2012-11-12T01:54:05.588-08:00</updated><title type='text'>Introduction To Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq-mTHZIJgUOtxpX7mCYQVAwgRmLqCJr1N8xNsXgABMAawt9bno_91DQrkTivkbjdo2W4QH-i6nB5lhzr1gFXMiPzDpwRXujohYRQVVRI-6E4wOEjmXsBpzMSXTEGgbjrAa-6C4Ifuh58/s1600/android-logo-white.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq-mTHZIJgUOtxpX7mCYQVAwgRmLqCJr1N8xNsXgABMAawt9bno_91DQrkTivkbjdo2W4QH-i6nB5lhzr1gFXMiPzDpwRXujohYRQVVRI-6E4wOEjmXsBpzMSXTEGgbjrAa-6C4Ifuh58/s320/android-logo-white.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Every day the mobile phone technologies changes very rapidly.
Now the mobiles phones are not only used for the calling purpose, but used for
listening music’s, watching movies, surfing the internet etc. Android is the
latest mobile operating platform developed from the java. Now android is the
most essential component in the smart phone industry. It is the most popular OS
for smartphones. The android mobile operating system was developed by the
android Inc. founded by Andy Rubin, Rich Miner, Chris White and Nick Sears in
2003. Later in 2005 Android Inc. was acquired by Google. One of the key feature
of the Android is it is an open source platform. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/7847631443229058256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/09/introduction-to-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/7847631443229058256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/7847631443229058256'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/09/introduction-to-android.html' title='Introduction To Android'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq-mTHZIJgUOtxpX7mCYQVAwgRmLqCJr1N8xNsXgABMAawt9bno_91DQrkTivkbjdo2W4QH-i6nB5lhzr1gFXMiPzDpwRXujohYRQVVRI-6E4wOEjmXsBpzMSXTEGgbjrAa-6C4Ifuh58/s72-c/android-logo-white.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7959022648036846246.post-6273588491040592436</id><published>2012-09-11T03:37:00.003-07:00</published><updated>2012-11-12T02:02:32.317-08:00</updated><title type='text'>Creating the First android app</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
The first android app is the &quot;Hello World&quot; app. Following are the steps for creating the first android app.&lt;strong&gt;&amp;nbsp; Open&amp;nbsp;eclipse IDE and Click&amp;nbsp; &lt;em&gt;file&amp;nbsp; ---new -----project---Android Project---next&amp;nbsp;.&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
Here i give the name of the project as &amp;nbsp;&lt;strong&gt;&lt;em&gt;FirstApp&lt;/em&gt;&lt;/strong&gt;. Note that every project name must start&amp;nbsp;with&amp;nbsp;capital letters only.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR3fIzliE3H7EftT5gQJZ3ncgC97Uu2ktHK1t6dlsuGoX834pH4hDz32t_5Ygs3-4bWSPbKar8_3_wP3Pd9Hs0nKw3q9DRt20eUDnMFbKm4-jBzq7KZmU-WiQ-2sdTPF335eKQ8X45f3g/s1600/6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR3fIzliE3H7EftT5gQJZ3ncgC97Uu2ktHK1t6dlsuGoX834pH4hDz32t_5Ygs3-4bWSPbKar8_3_wP3Pd9Hs0nKw3q9DRt20eUDnMFbKm4-jBzq7KZmU-WiQ-2sdTPF335eKQ8X45f3g/s1600/6.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Press &lt;strong&gt;&lt;em&gt;next&lt;/em&gt;&lt;/strong&gt; and here i take the&lt;strong&gt;&lt;em&gt; target name 2.2&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixClR8pVYoaa4hp26JJis62AyWg2Xuj5TJjMTcJvqMvGlXl_S0yNlQQ8uzLW14wlGeh-rYJp4qD2JKnno0XcFh5oLH8h_7su6SoCHE12eYe8VcpdcfFseGJHUzPK-4VNVWjd0VSX8EuAA/s1600/7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixClR8pVYoaa4hp26JJis62AyWg2Xuj5TJjMTcJvqMvGlXl_S0yNlQQ8uzLW14wlGeh-rYJp4qD2JKnno0XcFh5oLH8h_7su6SoCHE12eYe8VcpdcfFseGJHUzPK-4VNVWjd0VSX8EuAA/s1600/7.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Press &lt;strong&gt;&lt;em&gt;next &lt;/em&gt;&lt;/strong&gt;and set &lt;strong&gt;&lt;em&gt;Application Name&lt;/em&gt;&lt;/strong&gt; as &lt;strong&gt;&lt;em&gt;FirstApp&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;package name&lt;/em&gt;&lt;/strong&gt; as &lt;strong&gt;com.codeglympse&lt;/strong&gt;(reverse of &amp;nbsp; &amp;nbsp; &amp;nbsp; my blog URL&amp;nbsp;), tick the &lt;strong&gt;&lt;em&gt;Create Activity&lt;/em&gt;&lt;/strong&gt; and name it as &lt;strong&gt;&lt;em&gt;StartActivity&lt;/em&gt;&lt;/strong&gt;, select the &lt;strong&gt;&lt;em&gt;Minimum sdk&lt;/em&gt;&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;Version to 8&lt;/em&gt;&lt;/strong&gt; and press &lt;strong&gt;&lt;em&gt;finish&lt;/em&gt;&lt;/strong&gt;.&lt;br /&gt;
Now expand the &lt;strong&gt;&lt;em&gt;project folder&lt;/em&gt;&lt;/strong&gt;, then expand the &lt;strong&gt;&lt;em&gt;res folder&lt;/em&gt;&lt;/strong&gt; then again expand the &lt;strong&gt;&lt;em&gt;layout foler&lt;/em&gt;&lt;/strong&gt;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZaEgtuTfm4mu7GqCUWEyoGVJJyA5N7d8KJp_x_-o9Mw42gSOSzovdWqzk1zKmXxFaIYGPN0K1S96gC2z1Er7QigW6hAnAV-Rds1M5j-6ve5LXjqK3xodVkzfuhevtEKNs_rsgoufWuUc/s1600/8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZaEgtuTfm4mu7GqCUWEyoGVJJyA5N7d8KJp_x_-o9Mw42gSOSzovdWqzk1zKmXxFaIYGPN0K1S96gC2z1Er7QigW6hAnAV-Rds1M5j-6ve5LXjqK3xodVkzfuhevtEKNs_rsgoufWuUc/s1600/8.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Double click the &lt;strong&gt;&lt;em&gt;main.xml&lt;/em&gt;&lt;/strong&gt; file and you will get the following form in eclipse.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuYOmlGdoJEVsrdIv8qO919g1_aFCLU_XHIabV7hAIoGIZBKzGeYArMJxY9GdxvUELNMPXwpjymfaVMjfetGxRu3QRqciJo-SYICYbkdyPqaG6dImnP5TPCxZUb2QkDrSaH75oQuraaL8/s1600/9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuYOmlGdoJEVsrdIv8qO919g1_aFCLU_XHIabV7hAIoGIZBKzGeYArMJxY9GdxvUELNMPXwpjymfaVMjfetGxRu3QRqciJo-SYICYbkdyPqaG6dImnP5TPCxZUb2QkDrSaH75oQuraaL8/s1600/9.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Now click the&lt;strong&gt;&lt;em&gt; main.xml&lt;/em&gt;&lt;/strong&gt; tag at the bottom of the form.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3_nFm7f5oL4pEhnnq8vxBkbJKgL8CkUamIg6QlqkPDTO3mFwq59omqXVQF_YxPYNsE0-2kMLXVhShTTb-WJ5LIHHYnB6WFVMCnXkq8H5FZmyRbMQ6VOEos8lDP6zCIvBwhyogQuR6s0/s1600/10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3_nFm7f5oL4pEhnnq8vxBkbJKgL8CkUamIg6QlqkPDTO3mFwq59omqXVQF_YxPYNsE0-2kMLXVhShTTb-WJ5LIHHYnB6WFVMCnXkq8H5FZmyRbMQ6VOEos8lDP6zCIvBwhyogQuR6s0/s1600/10.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the bellow code, you have to edit only the code segment shown in bold.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; bgcolor=&quot;#fcdff&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;&lt;a href=&quot;http://schemas.android.com/apk/res/android&quot;&gt;http://schemas.android.com/apk/res/android&lt;/a&gt;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text=&quot;&lt;strong&gt;HELLO FROM MY FIRST PROJECT&lt;/strong&gt;&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Now run the application. &lt;br /&gt;
&amp;nbsp;Right click the project folder on project explorer and select &lt;strong&gt;&lt;em&gt;run as&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;&lt;em&gt; ---&lt;/em&gt;&lt;/strong&gt; A&lt;strong&gt;&lt;em&gt;ndroid application&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Output :&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz0twmBjUYHblhO-GUL0CO7FELGANaCFNMQipGLthiZmFJ0nDpcqrPpXgbEcm51zEuIT0kakN-DYtYNjvm9LbsqUQ-jqzou5n7lyd3lXu8e4j1Y0DCODTcrvdY3m6F8hwZVAazrYDmPw8/s1600/11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz0twmBjUYHblhO-GUL0CO7FELGANaCFNMQipGLthiZmFJ0nDpcqrPpXgbEcm51zEuIT0kakN-DYtYNjvm9LbsqUQ-jqzou5n7lyd3lXu8e4j1Y0DCODTcrvdY3m6F8hwZVAazrYDmPw8/s1600/11.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;

&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeglympse.blogspot.com/feeds/6273588491040592436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codeglympse.blogspot.com/2012/09/creating-first-android-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/6273588491040592436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7959022648036846246/posts/default/6273588491040592436'/><link rel='alternate' type='text/html' href='http://codeglympse.blogspot.com/2012/09/creating-first-android-app.html' title='Creating the First android app'/><author><name>RESHMI</name><uri>http://www.blogger.com/profile/14613130239184289128</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR3fIzliE3H7EftT5gQJZ3ncgC97Uu2ktHK1t6dlsuGoX834pH4hDz32t_5Ygs3-4bWSPbKar8_3_wP3Pd9Hs0nKw3q9DRt20eUDnMFbKm4-jBzq7KZmU-WiQ-2sdTPF335eKQ8X45f3g/s72-c/6.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>