<?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>Droidweb.com &#187; Programming</title>
<atom:link href="http://droidweb.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
<link>http://droidweb.com</link>
<description>Your source for Android application reviews, programming tips, and other Android advice</description>
<lastBuildDate>Fri, 23 Dec 2011 13:21:14 +0000</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>http://wordpress.org/?v=3.3.1</generator>
<item>
<title>Fix @Override Errors in your Eclipse Console</title>
<link>http://droidweb.com/2011/12/fix-override-errors-in-your-eclipse-console/</link>
<comments>http://droidweb.com/2011/12/fix-override-errors-in-your-eclipse-console/#comments</comments>
<pubDate>Thu, 22 Dec 2011 13:27:00 +0000</pubDate>
<dc:creator>triplem</dc:creator>
<category>
<![CDATA[Android Development Corner]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[eclipse]]>
</category>
<guid isPermaLink="false">http://droidweb.com/?p=2376</guid>
<description>
<![CDATA[Often when importing Android code into my Eclipse workspace, I find that there are a lot of new &#8216;errors&#8217; introduced to the code.  These errors were closely linked to my...]]>
</description>
<content:encoded>
<![CDATA[<p><a href="http://droidweb.com/wp-content/uploads/2011/12/eclipse.png"><img src="http://droidweb.com/wp-content/uploads/2011/12/eclipse-300x106.png" alt="" title="eclipse" width="300" height="106" class="aligncenter size-medium wp-image-2380" /></a></p>
<p>Often when importing Android code into my Eclipse workspace, I find that there are a lot of new &#8216;errors&#8217; introduced to the code.  These errors were closely linked to my overriden classes (something you&#8217;ll find quite often in android code) and read &#8220;The method X must override a superclass method&#8221; .  For the longest time I&#8217;ve wondered how to reliably fix those bugs (until now I had been removing and re-adding the @Override keyword as appropriate to make the compiler shut up).  This morning I stumbled across a <a href="http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips">Stack Overflow</a> thread that finally solves this problem.</p>
<p>You see, the problem is related to which version of Java the code is checked for compatibility errors against.  Eclipse defaults to using Java 1.5, which only allows the use of interface methods if super() is called.  Java 1.6 allowed the use of the @Override keyword to designation the interface implementation which is current standard way of overriding interface classes in Android coding.</p>
<p>To fix your problem you just need to do a bit of tinkering in the project settings in Eclipse.  Go to your project preferences and under Java &gt; Compiler set the java compiler to 1.6.  While this might fix the error, it is more likely that you&#8217;re going to have to change the project specific value for compiler level as well.  Select &#8221;Configure project specific settings&#8221; and change the java compiler value there to 1.6 as well.  After an automatic rebuild of your project, you should see all of those pesky error messages disappear!</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2011/12/fix-override-errors-in-your-eclipse-console/feed/</wfw:commentRss>
<slash:comments>1</slash:comments>
</item>
<item>
<title>Starting Android Development Part 3: Layout Tutorial 2</title>
<link>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-2/</link>
<comments>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-2/#comments</comments>
<pubDate>Wed, 06 Jan 2010 05:43:18 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Android Development Corner]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[Android Developer Center]]>
</category>
<category>
<![CDATA[development]]>
</category>
<category>
<![CDATA[layout design]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=1312</guid>
<description>
<![CDATA[As promised, here’s part two of my coverage on layouts in Android.&#160; Lets pick up where we left off, namely we just created a main.xml file for layout of our...]]>
</description>
<content:encoded>
<![CDATA[</p>
<p> <img title="ADC_logo" style="display: block; float: none; margin-left: auto; margin-right: auto" height="253" alt="" src="http://www.blog.droidweb.com/wp-content/uploads/2009/12/ADC_logo1-300x253.png" width="300" />
<p>As promised, here’s part two of my coverage on layouts in Android.&#160; Lets pick up where we left off, namely we just created a main.xml file for layout of our temperature conversion application.</p>
<p>So you know what we’re trying to achieve here, here’s a screenshot of the final product.</p>
<p><a href="http://droidweb.com/wp-content/uploads/2010/01/temp_screen_final.png"><img title="temp_screen_final" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="244" alt="temp_screen_final" src="http://droidweb.com/wp-content/uploads/2010/01/temp_screen_final_thumb.png" width="194" border="0" /></a> </p>
<p>I know what you’re thinking.&#160; That’s not that cute of a layout.&#160; I’ll leave the job of making really pretty layouts to you after you learn the basics.&#160; For now this layout will do to show you how making layouts in Android works.</p>
<p>This layout consists of a TableLayout (A Linear Layout could have done here as well).&#160; Each table row has other items embedded in it.&#160; One row even has a TableLayout embedded within it (just to show that you can do this).&#160; This is a valid layout, but is generally frowned upon, as embedding table layouts within table layouts can lead to slower UI performance in the long run.</p>
<p>Here’s the code for the layout:</p>
<blockquote><p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;     <br />&lt;TableLayout      <br />android:id=&quot;@+id/widget45&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;fill_parent&quot;      <br />android:orientation=&quot;vertical&quot;      <br />xmlns:android=&quot;<a href="http://schemas.android.com/apk/res/android&quot;">http://schemas.android.com/apk/res/android&quot;</a>      <br />&gt;      <br />&lt;TextView      <br />android:id=&quot;@+id/title&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:background=&quot;#ff0000ff&quot;      <br />android:padding=&quot;10px&quot;      <br />android:text=&quot;Temperature Conversion App&quot;      <br />android:textSize=&quot;18px&quot;      <br />android:typeface=&quot;sans&quot;      <br />android:textStyle=&quot;bold&quot;      <br />&gt;      <br />&lt;/TextView&gt;      <br />&lt;TableLayout      <br />android:id=&quot;@+id/widget62&quot;      <br />android:layout_width=&quot;319px&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;vertical&quot;      <br />&gt;      <br />&lt;TableRow      <br />android:id=&quot;@+id/widget63&quot;      <br />android:layout_width=&quot;149px&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;horizontal&quot;      <br />&gt;      <br />&lt;EditText      <br />android:id=&quot;@+id/User_input_F&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:textSize=&quot;18sp&quot;      <br />android:text=&quot; &quot;      <br />&gt;      <br />&lt;/EditText&gt;      <br />&lt;TextView      <br />android:id=&quot;@+id/widget78&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;(ºF)&quot;      <br />&gt;      <br />&lt;/TextView&gt;      <br />&lt;/TableRow&gt;      <br />&lt;TableRow      <br />android:id=&quot;@+id/widget64&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;horizontal&quot;      <br />&gt;      <br />&lt;EditText      <br />android:id=&quot;@+id/User_input_C&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:textSize=&quot;18sp&quot;      <br />android:text=&quot; &quot;      <br />&gt;      <br />&lt;/EditText&gt;      <br />&lt;TextView      <br />android:id=&quot;@+id/widget79&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;(ºC)&quot;      <br />&gt;      <br />&lt;/TextView&gt;      <br />&lt;/TableRow&gt;      <br />&lt;TableRow      <br />android:id=&quot;@+id/widget65&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;horizontal&quot;      <br />&gt;      <br />&lt;EditText      <br />android:id=&quot;@+id/widget83&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:textSize=&quot;18sp&quot;      <br />android:text=&quot; &quot;      <br />&gt;      <br />&lt;/EditText&gt;      <br />&lt;TextView      <br />android:id=&quot;@+id/User_input_K&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;(ºK)&quot;      <br />&gt;      <br />&lt;/TextView&gt;      <br />&lt;/TableRow&gt;      <br />&lt;/TableLayout&gt;      <br />&lt;TableRow      <br />android:id=&quot;@+id/Conversion&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;horizontal&quot;      <br />&gt;      <br />&lt;TextView      <br />android:id=&quot;@+id/conversion&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;Convert to:&quot;      <br />&gt;      <br />&lt;/TextView&gt;      <br />&lt;RadioGroup      <br />android:id=&quot;@+id/widget144&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;vertical&quot;      <br />&gt;      <br />&lt;RadioButton      <br />android:id=&quot;@+id/F_Select&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;Fareinheit&quot;      <br />&gt;      <br />&lt;/RadioButton&gt;      <br />&lt;RadioButton      <br />android:id=&quot;@+id/C_Select&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;Celcius&quot;      <br />&gt;      <br />&lt;/RadioButton&gt;      <br />&lt;RadioButton      <br />android:id=&quot;@+id/K_Select&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;Kelvin&quot;      <br />&gt;      <br />&lt;/RadioButton&gt;      <br />&lt;/RadioGroup&gt;      <br />&lt;/TableRow&gt;      <br />&lt;TableRow      <br />android:id=&quot;@+id/widget84&quot;      <br />android:layout_width=&quot;fill_parent&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:orientation=&quot;horizontal&quot;      <br />&gt;      <br />&lt;Button      <br />android:id=&quot;@+id/Calculate&quot;      <br />android:layout_width=&quot;wrap_content&quot;      <br />android:layout_height=&quot;wrap_content&quot;      <br />android:text=&quot;Calculate&quot;      <br />&gt;      <br />&lt;/Button&gt;      <br />&lt;/TableRow&gt;      <br />&lt;/TableLayout&gt; </p>
</blockquote>
<p>Note how each element has an id attribute (android:id) and the value of that attribute starts with <a href="mailto:&ldquo;@+id/name">“@+id/<em>name</em>”</a>.&#160; <a href="mailto:&ldquo;@+id/">“@+id/</a>” identifies the name by which you can refer to this<br />
layout element later in your java programming.&#160; Other things to note include:</p>
<ul>
<li><strong>android:layout_width</strong> and <strong>android:layout_height</strong>: Use these to determine how much space an element is going to take up.&#160; These can have two values: wrap_content and fill_parent.&#160; Wrap content means the element will only be as large as it needs to be to display its content.&#160; Fill_parent means the element will fill all available space it can, as determined by the parent element it resides in</li>
<li>To find the attribute applicable to a given layout, check out that layouts documentation at the developer.android.com/reference website.&#160; E.g. the API site for TableLayout is     <br /><a title="http://developer.android.com/reference/android/widget/TableLayout.html" href="http://developer.android.com/reference/android/widget/TableLayout.html">http://developer.android.com/reference/android/widget/TableLayout.html</a>. I usually find the page i need by just searching “android layout” and the name of the element I’m using</li>
</ul>
<p>In the next post of this series I will discuss some common Android layout elements, what they look like, and some of the attributes associated with that element.&#160; Then it’ll be time to connect our layout (frontend) to the logic that makes it work (the backend).&#160; For now check out the code I provided, try to understand how it works, and practice creating your own Android layouts!</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-2/feed/</wfw:commentRss>
<slash:comments>2</slash:comments>
</item>
<item>
<title>Starting Android Development Part 3: Layout Tutorial 1</title>
<link>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-1/</link>
<comments>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-1/#comments</comments>
<pubDate>Tue, 05 Jan 2010 21:28:48 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Android Development Corner]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[Android Developer Center]]>
</category>
<category>
<![CDATA[development]]>
</category>
<category>
<![CDATA[layout design]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=1306</guid>
<description>
<![CDATA[Now that I’ve bored you to death with details about how Android programming works, lets actually put something together, shall we?  This post will deal mainly with creating layouts in...]]>
</description>
<content:encoded>
<![CDATA[<p><img style="display: block; float: none; margin-left: auto; margin-right: auto;" title="ADC_logo" src="http://www.blog.droidweb.com/wp-content/uploads/2009/12/ADC_logo1-300x253.png" alt="" width="300" height="253" /></p>
<p>Now that I’ve bored you to death with details about how Android programming works, lets actually put something together, shall we?  This post will deal mainly with creating layouts in Android and will finish up with a sample layout for our Temperature Conversion project.</p>
<p>For what Google has to say about layouts check out their developers site at <a href="http://developer.android.com/guide/topics/ui/index.html">http://developer.android.com/guide/topics/ui/index.html</a>.</p>
<p>Now let me explain a little of what you read.  Layouts for Android screens are described in XML files in your /res/layout/ folder.  The XML file describes a hierarchy of layout elements.  The higher level elements determine the where of your layout and the lower level elements within these elements determine the what of your layout.</p>
<p>Ok that was a mouthful.  Lets look at the <em>simple</em> example Google provided:</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;LinearLayout xmlns:android=&#8221;<a href="http://schemas.android.com/apk/res/android&quot;">http://schemas.android.com/apk/res/android&#8221;</a><br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
android:orientation=&#8221;vertical&#8221; &gt;<br />
&lt;TextView android:id=&#8221;@+id/text&#8221;<br />
android:layout_width=&#8221;wrap_content&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;Hello, I am a TextView&#8221; /&gt;<br />
&lt;Button android:id=&#8221;@+id/button&#8221;<br />
android:layout_width=&#8221;wrap_content&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;Hello, I am a Button&#8221; /&gt;<br />
&lt;/LinearLayout&gt;</p></blockquote>
<p>The Linear Layout describes the where, e.g. how the elements within this tag are going to be positioned in relation to each other.  TextView and Button are two lower level elements which are UI elements the user will interact with (a box in which to enter data and a clickable button, respectively)</p>
<p>The result of that layout is listed below.  Note the fact that Linear Layout makes the elements line up one below another (We’ll get into the alternative options later).</p>
<p style="text-align: center;"><a href="http://www.blog.droidweb.com/wp-content/uploads/2010/01/Picture 3.png"><img class="aligncenter" style="border: 0pt none; display: block;" src="http://droidweb.com/wp-content/uploads/2010/01/Picture3_thumb.png" border="0" alt="Click Me to Make Me Bigger!" width="244" height="198" /></a></p>
<p>Armed with this knowledge, lets try to make our own Layout.</p>
<ul>
<li>Go to File &gt; New &gt; Other</li>
<li>Click on Android &gt; Android XML file</li>
<li>Click Next</li>
<li>In the resulting screen fill out the following values:</li>
<li>Project: Click Browse and select the project you want to associate this XML file with (for this demonstration it would be whatever you named the temperature conversation application project)</li>
<li>File: Call this file main.xml</li>
<li>Click Layout for the type of resource</li>
<li>Choose Linear Layout for the root element of the XML file</li>
</ul>
<p>Everything should look similar to the screenshot below:</p>
<p><a href="http://droidweb.com/wp-content/uploads/2010/01/Picture5.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="Picture 5" src="http://droidweb.com/wp-content/uploads/2010/01/Picture5_thumb.png" border="0" alt="Picture 5" width="244" height="243" /></a></p>
<ul>
<li>Click Finish</li>
</ul>
<p>In the coming posts in this series I will go over an actual layout and discuss some of the common layout elements for Android programs.  Stay Tuned!</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2010/01/starting-android-development-part-3-layout-tutorial-1/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
<item>
<title>Starting Android Development Part 2: Project Structure</title>
<link>http://droidweb.com/2010/01/starting-android-development-part-2-project/</link>
<comments>http://droidweb.com/2010/01/starting-android-development-part-2-project/#comments</comments>
<pubDate>Sat, 02 Jan 2010 13:30:00 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Android Development Corner]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[Andriod]]>
</category>
<category>
<![CDATA[Android Developer Center]]>
</category>
<category>
<![CDATA[developer tips]]>
</category>
<category>
<![CDATA[development]]>
</category>
<category>
<![CDATA[eclipse]]>
</category>
<category>
<![CDATA[SDK]]>
</category>
<category>
<![CDATA[starting]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=1242</guid>
<description>
<![CDATA[In Part One of Starting Android Development, we discussed setting up your project in Eclipse.  Now it&#8217;s time to explain exactly what’s going on and how Android development works.  This...]]>
</description>
<content:encoded>
<![CDATA[<p><img style="display: block; float: none; margin-left: auto; margin-right: auto;" title="ADC_logo" src="http://www.blog.droidweb.com/wp-content/uploads/2009/12/ADC_logo1-300x253.png" alt="" width="300" height="253" /></p>
<p>In <a href="http://www.blog.droidweb.com/?p=1217">Part One</a> of <em>Starting Android Development</em>, we discussed setting up your project in Eclipse.  Now it&#8217;s time to explain exactly what’s going on and how Android development works.  This information will help you keep things in perspective as you program, and it will help you when it comes to debugging time.</p>
<p>Let&#8217;s take a look at the Eclipse screen after you’ve set up a given project:</p>
<p style="text-align: center;"><a href="http://droidweb.com/wp-content/uploads/2009/12/Picture6.png"><img class="aligncenter" style="display: inline; border: 0px;" title="Picture 6" src="http://droidweb.com/wp-content/uploads/2009/12/Picture6_thumb.png" border="0" alt="Picture 6" width="436" height="309" /></a></p>
<p>For the purposes of this explanation, let&#8217;s look at the directories in the left pane of the Eclipse screen.  Under the name of the project you&#8217;ve just created, you should see several subfolders.  Let&#8217;s explain what they do:</p>
<ul>
<li><strong>src</strong>: This holds the source code for your project.
<ul>
<li><strong>com.droidweb.conversion</strong>: This is the package holding your source code.  Several packages can make up a single project.  This is especially true when you include others&#8217; packages to provide some type of functionality for your program.  For example, in a conversion application I wrote (ConvertAll+), I imported a package to handle different currencies.
<ul>
<li><strong>convert.java</strong>: Inside the package are individual .java files.  This is where the goodies (the source code itself) are.</li>
</ul>
</li>
</ul>
</li>
<li><strong>gen</strong>: This is a folder for automatically generated stuff Android uses to help your program operate properly.  There’s nothing in here that you need to mess with.  It will automatically update itself as necessary.  Sometimes when you import projects and they return errors, the solution is to delete this folder and let Eclipse regenerate it for you . . . but more about that later.
<ul>
<li><strong>com.droidweb.conversion</strong>: This is the package holding automatically generated code corresponding to the package of the same name in the /src/ folder.
<ul>
<li><strong>R.java</strong>: R.java is an automatically created and maintained file that keeps up with the resources your project utilizes.  In a lot of your Android programming, you’re going to use static variables that really translate into numerical (usual hex) values.  R.java makes the translation between these variables and their numerical values.</li>
</ul>
</li>
</ul>
</li>
<li><strong>Android 1.5</strong> (or appropriate Android source version): This contains the actual Android source code on top of which you’re going to build your applications.  As such, I’m not really going to discuss this much.</li>
<li><strong>assets</strong>:  Why, this is what you set your &#8212; oh wait &#8212; wrong thing. . . . Usually you won&#8217;t mess with this folder, but if you have raw files to be read by your application, then they <em>can</em> be put here; but it&#8217;s probably better that it goes in the /res/raw folder.  More about that later.</li>
<li><strong>res</strong>: res stands for resources.  Here is where you put your resources (images, files, etc).
<ul>
<li><strong>drawable</strong>: This is where the images you’re going to use go.  Android supports a variety of image files, including .jpg, .gif (static), png, etc.</li>
<li><strong>layout</strong>: This is where the .xml files describing your program layouts go.  I’ll spend a post on those later.</li>
<li><strong>values</strong>: This is where .xml files defining values can be stored.  An example is a network topography program I worked on.  In the custom view drawing routine, I predefined the colors of good / bad links in a .xml file in the /srv/values folder.</li>
</ul>
</li>
<li><strong>AndroidManifest.xml</strong>: This is the file that will be the source of the most headaches for you (well, starting out it will be . . .).  This is where your project is described in a form that Android devices can understand.  Application permissions, activity descriptions, and more are found here.  This file itself will be the topic of a future post onto itself &#8212; yes, it&#8217;s that important.</li>
</ul>
<p>Next time we&#8217;ll discuss program flow in a typical Android program.</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2010/01/starting-android-development-part-2-project/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
<item>
<title>Learn Android Basic Programming Skills via Android Competency Center</title>
<link>http://droidweb.com/2009/08/learn-android-basic-programming-skills-via-android-competency-center/</link>
<comments>http://droidweb.com/2009/08/learn-android-basic-programming-skills-via-android-competency-center/#comments</comments>
<pubDate>Sun, 02 Aug 2009 08:06:25 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[Website Review]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[tutorial]]>
</category>
<category>
<![CDATA[website]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=987</guid>
<description>
<![CDATA[Here&#8217;s a site I&#8217;ve enjoyed the use of.  Android Competency Center is a android related blog that focusses on just that; being competent in programming for Android. Tutorials include helpful...]]>
</description>
<content:encoded>
<![CDATA[<p style="clear: both"><a class="image-link" href="http://droidweb.com/wp-content/uploads/2009/08/Picture_2-full.png"><img class="linked-to-original" style=" text-align: center; display: block; margin: 0 auto 10px;" src="http://droidweb.com/wp-content/uploads/2009/08/Picture_2-thumb.png" alt="" width="359" height="210" /></a>Here&#8217;s a site I&#8217;ve enjoyed the use of.  <a href="http://www.androidcompetencycenter.com/">Android Competency Center</a> is a android related blog that focusses on just that; being competent in programming for Android.</p>
<p style="clear: both">Tutorials include helpful snippets about:</p>
<ul style="clear: both">
<li><a href="http://www.androidcompetencycenter.com/2009/02/android-audio-support/">Audio Support in Android</a></li>
<li><a href="http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/">Starting Service at Boot</a></li>
<li><a href="http://www.androidcompetencycenter.com/2008/12/android-api-sms-handling/">SMS Handling via Android API</a></li>
<li>Much More</li>
</ul>
<p>Lately I&#8217;ve found myself relying on this site more and more for simple tutorials to quickly create certain functionality in my programs. Hope you enjoy it!</p>
<p><br class="final-break" style="clear: both" /></p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/08/learn-android-basic-programming-skills-via-android-competency-center/feed/</wfw:commentRss>
<slash:comments>1</slash:comments>
</item>
<item>
<title>Developer Tip #6: Programmatically Reading and Writing From SD Card</title>
<link>http://droidweb.com/2009/07/developer-tip-6-programmatically-reading-and-writing-from-sd-card/</link>
<comments>http://droidweb.com/2009/07/developer-tip-6-programmatically-reading-and-writing-from-sd-card/#comments</comments>
<pubDate>Tue, 28 Jul 2009 19:00:00 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[DroidTips]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[access SD Card]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[read files]]>
</category>
<category>
<![CDATA[reference]]>
</category>
<category>
<![CDATA[SD card]]>
</category>
<category>
<![CDATA[tutorial]]>
</category>
<category>
<![CDATA[write files]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=953</guid>
<description>
<![CDATA[Here’s a little low-level tutorial that I think will make your lives easier.&#160; What the use in enabling your SD card in a development environment, if you don’t know how...]]>
</description>
<content:encoded>
<![CDATA[<p>Here’s a little low-level tutorial that I think will make your lives easier.&#160; What the use in <a href="http://www.blog.droidweb.com/?p=899">enabling your SD card</a> in a development environment, if you don’t know how to read / write to said drive?&#160; Well have no fear.&#160; Here’s a condensed, simple method for doing just that.</p>
<p align="left">private void WriteToFile(String what_to_write) {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; try{     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /* Environment.getExternalStorage Directory calls the SDCard&#8217;s filepath, which may change per device */     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; File root = Environment.getExternalStorageDirectory();     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //<strong>if we have permission to write to this drive&#8230;      <br /></strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(root.canWrite()){     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; File dir = new File(root + &quot;where_on_the_SDCard_do_you_want_to_write&quot;);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; File datafile = new File(dir, number + &quot;.extension&quot;);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FileWriter datawriter = new FileWriter(datafile);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; BufferedWriter out = new BufferedWriter(datawriter);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // <strong>More likely is going to be a loop that writes consecutive entries of data</strong>     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out.write(what_to_write);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //<strong>remember to close what you open&#8230;</strong>     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; out.close();     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }catch(IOException e){     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Log.e(&quot;Whoops&quot;, &quot;Can&#8217;t write&quot; + e.getMessage());     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160; }</p>
<p>Ok… now that we can write to file… how about reading from that file?&#160; See below:</p>
<p align="left"><strong>/*calling SD drive&#8230; you can replace w/ whatever path you want */</strong>     <br />File f = new File(Environment.getExternalStorageDirectory().getPath() + &quot;your_path&quot; + &quot;.your_extension&quot;);     <br />FileInputStream fileIS = new FileInputStream(f);     <br />BufferedReader buf = new BufferedReader(new InputStreamReader(fileIS));     <br />String read = new String();     <br />while((read = buf.readLine())!= null){     <br />&#160;&#160;&#160; //<strong>Do Something Which each line of data read</strong>     <br />&#160;&#160;&#160; parse(read);     <br />} </p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/07/developer-tip-6-programmatically-reading-and-writing-from-sd-card/feed/</wfw:commentRss>
<slash:comments>1</slash:comments>
</item>
<item>
<title>Find Android Tutorials at Tactel US Developer Corner (TDC)</title>
<link>http://droidweb.com/2009/06/find-android-tutorials-at-tactel-us-developer-corner-tdc/</link>
<comments>http://droidweb.com/2009/06/find-android-tutorials-at-tactel-us-developer-corner-tdc/#comments</comments>
<pubDate>Tue, 30 Jun 2009 19:30:40 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[developers]]>
</category>
<category>
<![CDATA[Tactel]]>
</category>
<category>
<![CDATA[Tactel Developer Center]]>
</category>
<category>
<![CDATA[TDC]]>
</category>
<category>
<![CDATA[tips]]>
</category>
<category>
<![CDATA[tutorials]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=774</guid>
<description>
<![CDATA[Looking for a source of comprehensive Android tutorials? Check out Tactel&#8216;s US Developer Corner (TDC). This is a brand new site (It just went live Monday) focusing on the Android...]]>
</description>
<content:encoded>
<![CDATA[<p>Looking for a source of comprehensive Android tutorials?  Check out <a href="http://www.tactelus.com/tactel/?region=us">Tactel</a>&#8216;s <a href="http://www.android-tactelus.com/">US Developer Corner (TDC)</a>.  This is a brand new site (It just went live Monday) focusing on the Android platform and providing Android Developers tutorials.  From the mission statement on the site:</p>
<p><strong>Mission Statement</strong></p>
<blockquote><p>The goal of the Tactel US Developer Corner is to inform and educate all developers from beginners to advanced skill levels about leading edge techniques and best practices with Android and beyond. Through in-depth tutorials and sample source code you will learn advanced topics and gain a new found ability to express your ideas whether it be a 2D or 3D game or another innovative application. The Tactel US Developer Corner  provides a community and networking resource so you can meet like-minded individuals and perhaps team-up to make the next great application. Get ready to download some leading edge code, meet new friends, and development partners; including us&#8230;</p></blockquote>
<p>One of the first projects of this site is to provide a tutorial on how to make a 3D FPS for Android!  I spoke with Michael Leahy of Tactel, and he said to &#8220;expect the first tutorials to appear by the end of the week and constant release after that in the coming 2-3 months&#8221;.  Be sure to check this site and check it often.</p>
<p>P.S. If there are any tutorials you would like to see, post here and we&#8217;ll try to provide them for you either though TDC or other means.</p>
<p><a href="http://droidweb.com/wp-content/uploads/2009/06/TDC.png"><img class="aligncenter size-medium wp-image-778" title="TDC" src="http://www.blog.droidweb.com/wp-content/uploads/2009/06/TDC-300x252.png" alt="TDC" width="300" height="252" /></a></p>
<h3><em>About Tactel:</em></h3>
<blockquote><p><em>Tactel is a leading developer of mobile applications, providing solutions and consulting services to many of the worlds major network operators and mobile handset vendors. We help these customers stay ahead of the game by designing genuinely original applications, and making sure they work on all networks and with all handsets.</em></p></blockquote>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/06/find-android-tutorials-at-tactel-us-developer-corner-tdc/feed/</wfw:commentRss>
<slash:comments>8</slash:comments>
</item>
<item>
<title>Android Development Tip #2: Reading an Input Stream</title>
<link>http://droidweb.com/2009/06/android-development-tip-2-reading-an-input-stream/</link>
<comments>http://droidweb.com/2009/06/android-development-tip-2-reading-an-input-stream/#comments</comments>
<pubDate>Tue, 16 Jun 2009 17:07:44 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[application]]>
</category>
<category>
<![CDATA[tips]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=607</guid>
<description>
<![CDATA[Commonly I have found myself sending HTTP POST / GET requests. In this process it is helpful to quickly see the response the phone receives to said request. Whether it...]]>
</description>
<content:encoded>
<![CDATA[<p>Commonly I have found myself sending HTTP POST / GET requests.  In this process it is helpful to quickly see the response the phone receives to said request.  Whether it be for debugging purposes or to aid with the writing of a parser, I have commonly used the following snippet to read the input stream received from a HTTP request.:</p>
<p><code>public static String ReadInputStream(InputStream in) throws IOException {<br />
StringBuffer stream = new StringBuffer();<br />
byte[] b = new byte[4096];<br />
for (int n; (n = in.read(b)) != -1;) {<br />
stream.append(new String(b, 0, n));<br />
}<br />
return stream.toString();<br />
}</code></p>
<p>Place this at the bottom of the class you want to use it in and call simply by using:<br />
<code>//Log.d("Input Stream Results", ReadInputStream(stream));</code></p>
<p><strong>BONUS: </strong><br />
Here&#8217;s some code that takes care of calling a URL, and getting the response:</p>
<p><code>HttpClient httpclient = new DefaultHttpClient();<br />
HttpPost httpost = new HttpPost(/* URL HERE */);<br />
HttpResponse response;<br />
try {<br />
response = httpclient.execute(httpost);<br />
HttpEntity entity = response.getEntity();<br />
InputStream stream = entity.getContent();<br />
Log.d("response", stream_reader(stream));<br />
} catch (ClientProtocolException e) {<br />
//Handle not connecting to client<br />
Log.d("ClientProtocolException Thrown", e.toString());<br />
} catch (IOException e) {<br />
//couldn't connect to host<br />
//TODO: HANDLE NOT CONNECTING TO CLIENT<br />
Log.d("IOException Thrown", e.toString());<br />
}<br />
</code><br />
Next Post: Handling HTTPS:// connections.</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/06/android-development-tip-2-reading-an-input-stream/feed/</wfw:commentRss>
<slash:comments>5</slash:comments>
</item>
<item>
<title>Widgets Tutorial Part 1: Planning</title>
<link>http://droidweb.com/2009/05/widgets-tutorial-part-1-planning/</link>
<comments>http://droidweb.com/2009/05/widgets-tutorial-part-1-planning/#comments</comments>
<pubDate>Sat, 16 May 2009 08:52:45 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[News]]>
</category>
<category>
<![CDATA[1.5]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[Gmail]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[tutorial]]>
</category>
<category>
<![CDATA[widgets]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=594</guid>
<description>
<![CDATA[About a week or two ago, we bought you an article about the support of widgets in Google SDK 1.5. In that same article I mentioned the Droid Dev challenge...]]>
</description>
<content:encoded>
<![CDATA[<p>About a week or two ago, we bought you an article about the support of widgets in Google SDK 1.5.  In that same article I mentioned the <a href="http://android-dls.com/droid-dev-challenge.html">Droid Dev challenge </a> sponsored by Android-dls.com.  I&#8217;m using this competition as an opportunity to provide a tutorial for creating widgets that builds upon the existing information.</p>
<p>First, a disclaimer.  Don&#8217;t use this tutorial in lieu of the quality information already out there.  This tutorial is going to be condensed at best.  I recommend checking out</p>
<ul>
<li> <a href="http://developer.android.com/guide/topics/appwidgets/index.html">Google AppWidget API</a>.</li>
<li><a href="http://android-developers.blogspot.com/2009/04/widget-design-guidelines.html">Android Developers Blog entry on Widgets</a>
<ul>
<li>There are a lot of good links from here</li>
</ul>
</li>
</ul>
<p>Ok, ready to begin?  First, I suppose, you need to come up with a widget idea.  My widget idea comes from a response to a blog post I made on <a href="http://www.googleandblog.com/taking-a-bite-out-of-cupcake-prespectives-on-the-sdk-15-update-for-android/3912/">Google And Blog</a>.  One user speculated that it would be useful to have a live folder for last x-number of unread e-mail.  I&#8217;m going to apply that idea to a widget.  Lets aim for a widget that shows your last unread e-mail, and upon clicking expands to show your last screen-full of unread e-mails, and has an option to go to either the gmail application, or the m.gmail.com website.</p>
<p><i>Next Post: The Androind manifest.xml file</i></p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/05/widgets-tutorial-part-1-planning/feed/</wfw:commentRss>
<slash:comments>2</slash:comments>
</item>
<item>
<title>Where to next? Android Roadmap is Needed</title>
<link>http://droidweb.com/2009/05/where-to-next-android-roadmap-is-needed/</link>
<comments>http://droidweb.com/2009/05/where-to-next-android-roadmap-is-needed/#comments</comments>
<pubDate>Wed, 13 May 2009 07:54:11 +0000</pubDate>
<dc:creator>Maliek Mcknight</dc:creator>
<category>
<![CDATA[News]]>
</category>
<category>
<![CDATA[android]]>
</category>
<category>
<![CDATA[Donut]]>
</category>
<category>
<![CDATA[Programming]]>
</category>
<category>
<![CDATA[roadmap]]>
</category>
<category>
<![CDATA[updates]]>
</category>
<guid isPermaLink="false">http://www.blog.droidweb.com/?p=547</guid>
<description>
<![CDATA[Ok the hype is done. Cupcake is being released to the end user, everyone, including myself, has talked about its features and analyzed it to a crisp. Now its time...]]>
</description>
<content:encoded>
<![CDATA[<p>Ok the hype is done.  Cupcake is being released to the end user, everyone, including myself, has talked about its features and analyzed it to a crisp.  Now its time to move our focus to the future.<br />
And thus begins another wait until the next Android update.  Called donut, people are clamoring for what features it will bring already.  Looking at <a href="http://source.android.com/roadmap"> Android&#8217;s Roadmap</a>, there&#8217;s not much information on the future path of Android past &#8220;Q1 2009&#8243;.</p>
<p>Lets see what the next iteration of Android will bring, shall we?</p>
<ul>
<li>Upgrade of the linux kernel to 2.6.29</li>
<li>Support for different types of screens (QVGA and WVGA in addition to current support for HVGA)</li>
<li>Fuller support of <a href="http://en.wikipedia.org/wiki/GPS_Phone">AGPS </a></li>
<li>Flash support, maybe?</li>
<li>Market Updates</li>
<li>Browser updates</li>
</ul>
<p>Not much information is floating around on cosmetic changes yet.  Also, release date?  Right now September is when Google is shooting for the next release.   More feature specs should be out before then, so stay tuned.  And if you find any information on Donut updates, let us know!</p>
]]>
</content:encoded>
<wfw:commentRss>http://droidweb.com/2009/05/where-to-next-android-roadmap-is-needed/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
</channel>
</rss>
<!-- Served from: blog.droidweb.com @ 2012-02-09 03:02:02 by W3 Total Cache -->
