<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Android code , Android Phone, Android Developers</title>
	<atom:link href="http://www.android-code.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.android-code.com</link>
	<description>Android code , Android Phone, Android Developers and New Google Android Technologies</description>
	<lastBuildDate>Mon, 14 Nov 2011 10:20:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hello World! Complete</title>
		<link>http://www.android-code.com/2011/04/12/291/</link>
		<comments>http://www.android-code.com/2011/04/12/291/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 05:03:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=291</guid>
		<description><![CDATA[Your next step is to import the package TextView from android.widget. This will give you access to the TextView and let you create your own instance of it. Place this code near the top of your current HelloWorldText.java file, where the existing import statements are import android.widget.TextView; Now, create an instance of TextView. By creating [...]]]></description>
			<content:encoded><![CDATA[<p>Your next step is to import the package TextView from android.widget. This will<br />
give you access to the TextView and let you create your own instance of it. Place this<br />
code near the top of your current HelloWorldText.java file, where the existing import<br />
statements are<br />
import android.widget.TextView;<br />
Now, create an instance of TextView. By creating the TextView instance, you can use<br />
it to display text to the screen without directly modifying main.xml. Place the following<br />
code after the onCreate( ) statement is fired:<br />
TextView HelloWorldTextView = new TextView(this);</p>
<p><a href="http://www.android-code.com/wp-content/uploads/2011/04/android.jpg"><img class="aligncenter size-full wp-image-292" title="android" src="http://www.android-code.com/wp-content/uploads/2011/04/android.jpg" alt="" width="419" height="350" /></a></p>
<p><strong>NOTE</strong><br />
TextView takes a handle to the current context as an argument. Pass this to the<br />
TextView to associate it with the current context. If you follow the hierarchy<br />
through the SDK, HelloWorldText extends Activity, which extends<br />
ApplicationContext, which in turn extends Context. This is how you can<br />
pass this to your TextView.<br />
The preceding line creates an instance of TextView named HelloWorldTextView<br />
and then instantiates HelloWorldTextView, by setting it to a new TextView. The new<br />
TextView is passed the context of this to be fully instantiated.<br />
Now that the TextView is defined, you can add your text to it. The following line of<br />
code assigns the text “Hello World!” to the TextView:<br />
HelloWorldTextView.setText(&#8220;Hello World!&#8221;);<br />
This line lets you set the text of your TextView. setText( ) lets you assign a string to the<br />
TextView.</p>
<p>Your TextView has been created and now contains the message that you want to<br />
display. However, simply passing “Hello World!” to the TextView does not display<br />
anything to the screen. As discussed previously, you need to set the ContentView to</p>
<p>&nbsp;</p>
<p>display something to the screen. You have to use the following code to set TextView<br />
to the context and display it to the screen:<br />
setContentView(HelloWorldTextView);<br />
Examining this line, you can see that you pass to setContentView your TextView. The<br />
preceding three lines of code are what it takes to make your Hello World! application.<br />
You created a TextView, assigned your text to it, and set it to the screen. All things<br />
considered, this is not very complicated at all.<br />
The full contents of your HelloWorldText.java file should look like the following:<br />
package android_programmers_guide.HelloWorldText;</p>
<p>import android.app.Activity;<br />
import android.os.Bundle;<br />
import android.widget.TextView;<br />
public class HelloWorldText extends Activity {<br />
/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle icicle) {<br />
super.onCreate(icicle);<br />
/**Hello World JFD */<br />
/**BEGIN           */<br />
/**Create TextView */<br />
TextView HelloWorldTextView = new TextView(this);<br />
/**Set text to Hello World */<br />
HelloWorldTextView.setText(&#8220;Hello World!&#8221;);</p>
<p>/**Set ContentView to TextView */<br />
setContentView(HelloWorldTextView);<br />
/**END             */<br />
}<br />
}<br />
Now compile and run your new Hello World! application in the Android Emulator.<br />
Choose Run | Run or press CTRL-F11 to launch the application in the Android Emulator. The following illustration depicts the results of your Hello World! application.</p>
<p>You have just created your first full Android Activity. This small project demonstrated<br />
a fairly common execution of a Hello World! application. You set a TextView to the<br />
Activity’s ContentView and displayed the “Hello World!” message to a cell phone screen<br />
in the Android Emulator. The following section looks at a slightly different way of<br />
implementing Hello World!, using an image. <a href="http://www.textabit.com/">mobile marketing</a></p>
<p><a href="http://www.itelbilling.com/html/itel_dialer.jsp">IP Phone</a> iTel Switch Plus is a carrier grade soft-switch, compatible to all standard VoIP devices. It offers class 4 and class 5 VoIP switch features. iTel billing is real time billing solution for VoIP service providers. iTel provides full suite of mobile VoIP solutions, tunneling and codec conversion products.</p>
<p><a href="http://www.jumpusa.com/nba_shooting_sleeves.html">Shooting Sleeves For Basketball</a> Shop for the best and huge collection of Sports Products from Jump USA. We offer a wide variety of Shooting Sleeves for Basketball, Shooting Sleeve, Running Speed Parachute, Knee Supports and many more at affordable price. Safe and Secure Shopping with FREE Shipping!</p>
<p><a href="http://www.telepacific.com/offer/data-network/1net.asp">MPLS</a> Discover TelePacific Multi Protocol Label Switching – MPLS our secure, private &amp; efficient business VPN.</p>
<p><a href="http://www.talk77.com/">Cheap calls to Europe</a> We are dealing international calls. we have the cheapest prices in UK and good voice quality.</p>
<p><a href="http://nokia-mobile-price-list.com/">Nokia Mobile Price</a> NBPL is a market leader for selling Nokia phone products. You will find all nokia mobiles with latest price information from us. Our Nokia Mobile Price list is a great souce for comparing Nokia phone prices.</p>
<p><a href="http://nokiamobile.ws/">Nokia Mobile</a> Nokia mobile phones known as the best quality mobiles in the world.</p>
<p><a href="http://www.allsat.com/">DISH Network</a> Order Dish Network from Allsat Dishnetwork Affiliate, you not only get the best satellite TV, you also get tons of channels and great service.</p>
<p><a href="http://www.sunlabsonline.com/Scripts/default.asp">Tanning</a> The Handy Tan System Kit is a must try airbrush tanning sprayer.Perfect for airbrush tanning on the go. Get the perfect tan at home.</p>
<p><a href="http://webdesign.opace.co.uk/">Web Design Birmingham</a> Web Design &amp; SEO company in Birmingham, West Midlands. Our expertise includes Joomla design, WordPress design and Magento development. Speak to our ecommerce design team or search engine optimisation consultants at Opace for more information.</p>
<p><a href="http://www.aberlawfirm.com/profile/">Software Attorney</a> Law firm focused on representing Software, SAAS, and IT Services companies.</p>
<p><a href="http://www.unlock-the-iphone.com">Unlock iphone</a> PATENTED 4.3.2 iPhone Unlock/Jailbreak Software &#8211; ***WE HAVE THE ONLY STATISTICALLY PROVEN SOLUTION ON THE INTERNET! Easy One-Click Solution puts our competitors to shame! iPhone 3G/3GS/4 Unlock Jailbreak.</p>
<p><a href="http://www.rebelfone.com/">Cellular Phone Service</a> Cellular Phone Service &#8211; RebelFone offers on Global Phone, GSM cell phones and unlocked cellular phones also provide cellular phone service.</p>
<p><a href="http://www.clay.co.in/">International Calling Cards</a> International calling cards &#8211; get International calling cards from clay.co.in at Save up to 70% on international roaming along with International calling cards, clay also offers prepaid data card, international roaming , Global Travel SIM, Prepaid SIM Card.</p>
<p>Tidal Storage are specialists in <a href="http://www.tidalstorage.com/tidal-data-storage-consulting/">Data Storage</a>, protection, virtualisation, backup and SAN Consulting.</p>
<p><a href="http://www.thesportsboxoffice.com/Manchester%20Utd/">man utd tickets</a> Manchester United FC Official Football Tickets are on sale Now. Buy Manchester United Tickets for all home and away games. Manchester United Tickets are on available to buy now!</p>
<p><a href="http://covenanteyespromocode.com/">Covenant Eyes Filtering Software</a> Covenant Eyes Filter gives parents control over how their kids use the Internet. Set time limits, and content limits appropriate for each of your kids. Subscribe using the promotional code &#8216;onedegree&#8217; and try it free for 30 days!</p>
<p><a href="http://www.ateleco.com/phone-service-installation">VOIP Phone Services</a> Get the best VoIP business phone systems, Cisco IP phones and wireless phone system for small business at cost effective prices.</p>
<p><a href="http://www.ledtorchshop.com.au/">Led Torches</a> Find high quality led torches, flashlights, batteries and related LED accessories in LED Torches Shop Australia.</p>
<p><a href="http://www.smartglobalcall.com/">Cheap International Call</a> Features Tel3Advantage and phone cards for making cheap phone calls from any phone or VoIP and PC Phone for international calling over the internet.</p>
<p><a href="http://avnet.com/">Electronic Components</a> Avnet distributes electronic components, connectors, semiconductors, technology solutions, computer products and embedded technology. Learn more.</p>
<p><a href="http://www.synapseindia.com/offshore-software-development.html">Offshore Software Development</a> SynapseIndia is an offshore software development company in India providing high quality custom software development services in various technologies.</p>
<p><a href="http://www.ramp.com.au/">RFID</a> Ramp is Australia’s leading RFID Software developer and Systems Integrator.</p>
<p><a href="http://www.telecafe.com.au/">Chat Line</a> TeleCafe is the most fun &amp; friendly phone chat line in Australia. Girls talk for free!</p>
<p><a href="http://www.college-scholarships.com/ssac.htm">online colleges</a> Earn online college degrees from the very best colleges and universities listed on this website.</p>
<p><a href="http://www.mazumamobile.com">phones for cash</a> Sell your old and used mobile phone. Mazuma Mobile recycle old and used mobile phones for cash. Trade in your old and used mobile phone online now!</p>
<p>Convert PSD to WordPress: We specialize in converting <a href="http://www.xhtmljunction.com/psd-to-wordpress.html">PSD to WordPress</a> themes and PSD to WordPress templates. Get PSD to WordPress theme conversion service at an affordable budget.</p>
<p>Get quality SEO <a href="http://www.linkbuildingworks.com">Link Building Firm</a> for high rankings! Link Building Works offers best Quality One Way Link Popularity Services at an affordable budget.</p>
<p>PSD to HTML, XHTML, CSS conversion discussions, reviews, tutorials, slicing/conversion <a href="http://www.xhtml-css-code.com">HTML Reviews</a>. XHTML-CSS-code provides slicing tips for designers, html coders, new &amp; old to improve their skills.</p>
<p><a href="http://www.sq1agency.com/services/mobile.html">Mobile Ad Agency</a> Square One Agency is a mobile marketing and ad agency that offers mobile advertising and commerce along with mobile app development.</p>
<p><a href="http://www.mp3mp4players.co.uk/6-mp-4-players">Touch Screen Mp3 Player</a> 50 % Discount &#8211; Buy online best mp3 player, mp 4 player radio, mp3 4gb fm, touch screen mp3 player fm, 8gig mp3 player at affordable price from electronic store.</p>
<p><a href="http://www.thestaplestore.com/">Copier Staples</a> We are official Online distributor of branded copier staples. We providing trusted staple brand with affordable price.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2011/04/12/291/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World! Again</title>
		<link>http://www.android-code.com/2011/03/21/hello-world-again/</link>
		<comments>http://www.android-code.com/2011/03/21/hello-world-again/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 07:44:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=284</guid>
		<description><![CDATA[While I have discussed the existence of this TextView in the xml, I have not yet discussed why it works without any corresponding code. I mentioned earlier in this book hat there are two ways to design a UI for Android: through the code, and through the main.xml file. The preceding code sample creates a [...]]]></description>
			<content:encoded><![CDATA[<p>While I have discussed the existence of this TextView in the xml, I have not yet discussed why it works without any corresponding code. I mentioned earlier in this book hat there are two ways to design a UI for Android: through the code, and through the main.xml file. The preceding code sample creates a TextView in xml and sets the text to “Hello World, HelloWorldText.” Edit this line of the main.xml file to read as follows:<br />
android:text=&#8221;This is the text of an Android TextView!&#8221;<br />
Rerun the project, and your results should appear as they do in this illustration. Take some time and experiment with the xml TextView.<br />
Then you can move on to another way of creating a Hello World! application.</p>
<p><strong>Hello World! Again</strong><br />
In this section, you will create another Hello World! application for Android. However, this time you will program the UI in code rather than by using the xml file—and you will actually do most of the work. The first step here is to remove the TextView code that is in main.xml. The following section of code represents the TextView. Removing it essentially makes your application an empty shell.<br />
&lt;TextView<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;Hello World, HelloWorldText&#8221;<br />
/&gt;</p>
<p>After you have removed the TextView code, your main.xml file should look like this:<br />
&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;LinearLayout xmlns:android=http://schemas.android.com/apk/res/android<br />
android:orientation=&#8221;vertical&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
&gt;<br />
&lt;/LinearLayout&gt;<br />
Now that you have a clean main.xml file, and thus a clean application shell, you can<br />
begin to add the code that will display “Hello World!” on the screen. Start by opening the<br />
HelloWorldText.java file and removing the following line:<br />
setContentView(R.layout.main);</p>
<p><strong>NOTE</strong><br />
You still need to set a ContentView for your new application; however, you are going<br />
to implement it slightly differently from how it is implemented here, so it is best to just<br />
remove the entire statement for now.</p>
<p><a href="http://www.blackberryiphoneapp.com">iPhone developer</a> Company provides mobile application development services that offers complete mobile computing solution for all needs.</p>
<p><a href="http://www.consumercellular.com">Cheapest cell phone plans</a> Consumer Cellular is a nationwide provider of best cell phone plans and cell phones for senior citizens, young and adults which are cheap, affordable and without any contracts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2011/03/21/hello-world-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video Chat for Android in 30 Lines of Code</title>
		<link>http://www.android-code.com/2010/12/06/video-chat-for-android-in-30-lines-of-code/</link>
		<comments>http://www.android-code.com/2010/12/06/video-chat-for-android-in-30-lines-of-code/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 09:33:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>
		<category><![CDATA[Android Mobile]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=268</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.android-code.com/2010/12/06/video-chat-for-android-in-30-lines-of-code/"><em>Click here to view the embedded video.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/12/06/video-chat-for-android-in-30-lines-of-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TIP Part 2</title>
		<link>http://www.android-code.com/2010/11/22/tip-part-2/</link>
		<comments>http://www.android-code.com/2010/11/22/tip-part-2/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 10:06:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=258</guid>
		<description><![CDATA[Considering that the setContentView( ) method is being told to set main.xml as the current View, and main.xml contains a TextView that says “Hello World, HelloWorldText,” it may be safe to assume that compiling and running HelloWorldText now will give you your Hello World! application. To test this, run your unaltered HelloWorldText application. Choose Run [...]]]></description>
			<content:encoded><![CDATA[<p>Considering that the setContentView( ) method is being told to set main.xml as the<br />
current View, and main.xml contains a TextView that says “Hello World, HelloWorldText,”<br />
it may be safe to assume that compiling and running HelloWorldText now will give<br />
you your Hello World! application. To test this, run your unaltered HelloWorldText<br />
application. Choose Run | Run to open the Run As dialog box, select Android Application,<br />
and click OK.</p>
<p><a href="http://www.android-code.com/wp-content/uploads/2010/11/1.jpg"><img class="aligncenter size-full wp-image-261" title="android programming" src="http://www.android-code.com/wp-content/uploads/2010/11/1.jpg" alt="" width="455" height="450" /></a></p>
<p>The new project you just established contains the code to create a Hello World!<br />
application on its own. However, that is not very engaging, nor does it teach you very<br />
much about programming an Android application. You need to dissect the project and<br />
see exactly how the project displayed the “Hello World!” message.<br />
What happened when you created the new Android project is that the Android plugin<br />
modified main.xml. This is a perfect example of one way to modify the UI in Android.<br />
The following lines of code are added to main.xml by the Android SDK when the project<br />
is created:<br />
&lt;TextView<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;Hello World, HelloWorldText&#8221;<br />
/&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/11/22/tip-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TIP</title>
		<link>http://www.android-code.com/2010/11/09/tip/</link>
		<comments>http://www.android-code.com/2010/11/09/tip/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 07:25:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=255</guid>
		<description><![CDATA[If you do not see the android.os.Bundle import statement in your project, expand the tree within your development window. Eclipse rolls up all the import statements under the first one, so you must expand the tree to see the rest of them. Focusing now on your class HelloWorldText, you can see that it extends the [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not see the android.os.Bundle import statement in your project, expand the<br />
tree within your development window. Eclipse rolls up all the import statements under<br />
the first one, so you must expand the tree to see the rest of them.<br />
Focusing now on your class HelloWorldText, you can see that it extends the Activity<br />
class. Activity is imported from the previous lines. All applications derive the Activity class,<br />
and this derivation is required for running an application on Android. For something to<br />
run and be displayed on the screen, it must be derived from Activity.<br />
The HelloWorldText class holds the code needed to create, display, and run your<br />
application. Right now there is only one method in your HelloWorldText class that is<br />
defined with code in it, onCreate( ).<br />
The onCreate( ) method takes in icicle as a bundle. That is, all of the current<br />
state information is bundled as an icicle object and held in memory. You will not be<br />
directly handling icicle in this application, but you need to be aware of its presence<br />
and purpose.</p>
<p>The next line in the file is the one that really does some perceptible action:<br />
setContentView(R.layout.main);<br />
The method setContentView( ) sets the Activity’s content to the specified resource.<br />
In this case, we are using the main.xml file from the layout directory via the pointer in<br />
the R.java file. The main.xml file, right now, contains nothing more than the size of the<br />
HelloWorldText screen and a TextView. The TextView is derived from View and is used<br />
to display text in an Android environment. Reviewing the contents of main.xml, you can<br />
see that it contains the following line:<br />
android:text=&#8221;Hello World, HelloWorldText&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/11/09/tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.java File</title>
		<link>http://www.android-code.com/2010/10/29/java-file/</link>
		<comments>http://www.android-code.com/2010/10/29/java-file/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 04:45:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=247</guid>
		<description><![CDATA[&#60;activity&#62;.java File The file in the src directory that you will spend the most time with is &#60;activity&#62;.java (HelloWorldText.java in this example), which is created by the Android plugin and named to match the Activity name that you specified in the New Android Project wizard. Unlike most of the files you have examined in this [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;activity&gt;.java File The file in the src directory that you will spend the most time with<br />
is &lt;activity&gt;.java (HelloWorldText.java in this example), which is created by the Android<br />
plugin and named to match the Activity name that you specified in the New Android<br />
Project wizard. Unlike most of the files you have examined in this section, this file is<br />
completely editable; in fact, it will do very little for you if you do not modify it with<br />
your code.<br />
After briefly looking at what is in your HelloWorldText.java file as it is created by the<br />
Android plugin, you will then edit the file to create your first Android Activity.</p>
<p>package android_programmers_guide.HelloWorldText;<br />
import android.app.Activity;<br />
import android.os.Bundle;</p>
<p>public class HelloWorldText extends Activity {<br />
/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle icicle) {<br />
super.onCreate(icicle);<br />
setContentView(R.layout.main);<br />
}<br />
}<br />
The three lines at the top of the file are the standard preprocessor directives—that is,<br />
as in most programming languages, statements that are directives to the compiler to run<br />
before the application process. In this case, you have the definition and inclusion of your<br />
package android_programmers_guide.HelloWorldText.<br />
The next two lines import specific packages from the Android SDK via android.jar:<br />
import android.app.Activity;<br />
and</p>
<p>import android.os.Bundle;<br />
These lines tell the project to include all the code from the imported packages before all<br />
the code in your application. These two lines are critical for your base Android application<br />
and should not be removed..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/10/29/java-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Open Source Project</title>
		<link>http://www.android-code.com/2010/10/16/android-open-source-project/</link>
		<comments>http://www.android-code.com/2010/10/16/android-open-source-project/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 12:22:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google Android]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=239</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.android-code.com/2010/10/16/android-open-source-project/"><em>Click here to view the embedded video.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/10/16/android-open-source-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R.java File</title>
		<link>http://www.android-code.com/2010/10/14/r-java-file/</link>
		<comments>http://www.android-code.com/2010/10/14/r-java-file/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 05:09:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=236</guid>
		<description><![CDATA[R.java File The file R.java is an auto-generated file that is added to your application by the Android plugin. This file contains pointers into the drawable, layout, and values directories (or the items within the directories, as is the case with strings and icons). You should never have to modify this file directly. You will [...]]]></description>
			<content:encoded><![CDATA[<p>R.java File The file R.java is an auto-generated file that is added to your application by the Android plugin. This file contains pointers into the drawable, layout, and values directories (or the items within the directories, as is the case with strings and icons). You should never have to modify this file directly. You will be referencing R.java in most of your applications. The code that was auto-generated for the HelloWorldText application follows:</p>
<p>/* AUTO-GENERATED FILE.  DO NOT MODIFY.<br />
*<br />
* This class was automatically generated by the<br />
* aapt tool from the resource data it found.  It<br />
* should not be modified by hand.<br />
*/<br />
package testPackage.HelloWorldText;<br />
public final class R {<br />
public static final class attr {<br />
}<br />
public static final class drawable {<br />
public static final int icon=0x7f020000;<br />
}<br />
public static final class layout {<br />
public static final int main=0x7f030000;<br />
}<br />
public static final class string {<br />
public static final int app_name=0x7f040000;<br />
}<br />
}</p>
<p><strong>NOTE</strong><br />
The comment section of the R.java file provides an explanation of the origin of the file. It states that the file was created by the aapt tool. In Chapter 6, when you create a command-line–only version of the Hello World! application, you will use command-line tools to create all of the auto-generated files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/10/14/r-java-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Directories in android</title>
		<link>http://www.android-code.com/2010/10/04/directories-in-android/</link>
		<comments>http://www.android-code.com/2010/10/04/directories-in-android/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 08:04:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=228</guid>
		<description><![CDATA[Directories There are also three directories in the project root—res, assets, and src—each of which has a distinct purpose. These directories play an integral part in the operation of your application. res Directory The res directory is where your in project resources are held and compiled into your application. When you create a new Android [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Directories</strong></p>
<p>There are also three directories in the project root—res, assets, and src—each of which has a distinct purpose. These directories play an integral part in the operation of your application.</p>
<p><strong>res Directory</strong></p>
<p>The res directory is where your in project resources are held and compiled into your application. When you create a new Android project, the res directory contains three subdirectories: drawable, layout, and values. You will use the drawable and layout directories in many of your projects to hold and display images and layouts respectively, whereas the values directory holds string globals that can be used throughout your</p>
<p>application.</p>
<p><strong>NOTE</strong></p>
<p>A reference to the res directory and its contents is contained by the R.java file, located in the src directory. This file is covered in much more detail later in the chapter. The drawable directory contains actual image files that your application can use and reference. The layout directory holds an XML file, main.xml, that is referenced by your application when building its interface. In most of the applications in this book, you will</p>
<p>be editing the main.xml file included in the layout directory. This will allow you to insert Views into the application’s visual layout and display them. An unaltered main.xml file contains the following code:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</p>
<p>&lt;LinearLayout xmlns:android=http://schemas.android.com/apk/res/android</p>
<p>android:orientation=&#8221;vertical&#8221;</p>
<p>android:layout_width=&#8221;fill_parent&#8221;</p>
<p>android:layout_height=&#8221;fill_parent&#8221;</p>
<p>&gt;</p>
<p>&lt;TextView</p>
<p>android:layout_width=&#8221;fill_parent&#8221;</p>
<p>android:layout_height=&#8221;wrap_content&#8221;</p>
<p>android:text=&#8221;Hello World, HelloWorldText&#8221;</p>
<p>/&gt;</p>
<p>&lt;/LinearLayout&gt;</p>
<p>The last directory under res, values, holds an XML file named strings. The strings.xml file is used to hold global string values that can be referenced by your application.</p>
<p><strong>assets Directory</strong></p>
<p>The assets directory is used to hold raw asset files. The files contained in the assets directory can include audio files for streaming and animation assets. we will not use any audio assets in the applications for this book because the beta audio drivers for the Android Emulator are not yet optimized.</p>
<p><strong>src Directory</strong></p>
<p>The src directory contains all the source files for your project. When your project is first created, it will contain two files, R.java and &lt;activity&gt;.java (in this example,</p>
<p>HelloWorldText.java), described next.</p>
<p><strong>NOTE</strong></p>
<p>&lt;activity&gt;.java is always named according to your Activity name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/10/04/directories-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Manifest File</title>
		<link>http://www.android-code.com/2010/09/28/android-manifest-file/</link>
		<comments>http://www.android-code.com/2010/09/28/android-manifest-file/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 10:07:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android applications]]></category>

		<guid isPermaLink="false">http://www.android-code.com/?p=222</guid>
		<description><![CDATA[AndroidManifest.xml The AndroidManifest.xml file is where your global settings are made. If you are an ASP.NET developer, you can think of AndroidManifest.xml as Web.config and Global.asax rolled into one. (If you are not an ASP.NET developer, this means that AndroidManifest.xml is a place for storing settings.) AndroidManifest.xml will include such settings as application permissions, Activities, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>AndroidManifest.xml</strong></p>
<p>The AndroidManifest.xml file is where your global settings are made. If you are an ASP.NET developer, you can think of AndroidManifest.xml as Web.config and Global.asax rolled into one. (If you are not an ASP.NET developer, this means that AndroidManifest.xml is a place for storing settings.) AndroidManifest.xml will include such settings as application permissions, Activities, and intent filters.</p>
<p>The standard AndroidManifest.xml file should contain the following information:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;manifest xmlns:android=http://schemas.android.com/apk/res/android<br />
package=&#8221;testPackage.HelloWorldText&#8221;&gt;<br />
&lt;application android:icon=&#8221;@drawable/icon&#8221;&gt;<br />
&lt;activity android:label=&#8221;@string/app_name&#8221;&gt;<br />
&lt;intent-filter&gt;<br />
&lt;action android:value=&#8221;android.intent.action.MAIN&#8221; /&gt;<br />
&lt;category android:value=&#8221;android.intent.category.LAUNCHER&#8221;<br />
/&gt;<br />
&lt;/intent-filter&gt;<br />
&lt;/activity&gt;<br />
&lt;/application&gt;<br />
&lt;/manifest&gt;<br />
As you create future applications, you will be adding information to this file. Notice that the package name you supplied is listed here, as well as the action that your Activity will handle.</p>
<p><strong>Referenced Libraries</strong></p>
<p>A list of the Referenced Libraries is also included in the root of the project. Typically, for a beginner project, you should see only one library here. Expand the Referenced Libraries branch and examine its contents, the libraries that are currently referenced by your application project. Given that this is a new Android project, you will see one library in your project’s references, android.jar, the Android SDK. (If you are familiar with the Java SDK, android.java is analogous to Java’s rt.java file, containing many of the Java APIs found in rt.java.) The Android plugin ensures that this file is the only library referenced by your application. The application needs to reference the SDK to gain access to all the classes contained in the SDK libraries, such as your Views, Controls, and even the Google API.</p>
<p><strong>CAUTION</strong><br />
Eclipse enables you to add other user-defined libraries and external classes to your project’s references. However, unless you are sure that those external references will work with your Android application (and thus on the Android platform), you should think twice before you add them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.android-code.com/2010/09/28/android-manifest-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

