<?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>VBSteven.be</title>
	<atom:link href="http://www.vbsteven.be/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vbsteven.be/blog</link>
	<description>A programmer&#039;s blog, by Steven Van Bael</description>
	<lastBuildDate>Sun, 17 Jan 2010 16:40:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Android debugging: Capturing network traffic with tcpdump</title>
		<link>http://www.vbsteven.be/blog/android-debugging-inspectin-network-traffic-with-tcpdump/</link>
		<comments>http://www.vbsteven.be/blog/android-debugging-inspectin-network-traffic-with-tcpdump/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 16:39:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[tcp-dump]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=219</guid>
		<description><![CDATA[




When writing Android applications that heavily rely on networking it can sometimes be useful to inspect the network traffic going out and coming into your device. Especially when writing applications that implement networking protocols (like ftp, smtp, ssh, xmpp,..) the ability to inspect packets at TCP-level is invaluable. The following guide will show you how [...]]]></description>
			<content:encoded><![CDATA[<!-- Easy AdSense V2.70 -->
<!-- Post[count: 3] -->
<div class="ezAdsense adsense adsense-leadin" style="float:right;margin:12px;" ><script type="text/javascript"><!--
google_ad_client = "pub-1722573990583553";
/* 180x150, gemaakt 29-7-09 top post */
google_ad_slot = "5582526830";
google_ad_width = 180;
google_ad_height = 150;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>When writing Android applications that heavily rely on networking it can sometimes be useful to inspect the network traffic going out and coming into your device. Especially when writing applications that implement networking protocols (like ftp, smtp, ssh, xmpp,..) the ability to inspect packets at TCP-level is invaluable. The following guide will show you how to do this on your Android device.</p>
<h2>Prerequisites</h2>
<p>What you&#8217;ll need in order to do this:</p>
<ul>
<li>an Android device connected to your computer via USB</li>
<li>root access on your device. Visit XDA developer forums for guides on how to gain root access</li>
<li>the Android SDK (downloadable from <a href="http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html</a>)</li>
<li>the tcpdump binary compiled for ARM cpus. (downloadable from <a title="here" href="http://www.eecs.umich.edu/~timuralp/tcpdump-arm">here</a>, credit goes out to the developer at <a href="http://nerdjusttyped.blogspot.com/2009/03/android-binary-solo.html">http://nerdjusttyped.blogspot.com/2009/03/android-binary-solo.html</a>)</li>
<li>if you want you can cross-compile the tcpdump sources yourself</li>
</ul>
<h2>Procedure</h2>
<p>First you have to get the tcpdump binary on the device. Execute the following adb push command in a terminal from your SDK/tools directory.</p>
<pre>$ ./adb push /home/steven/tcpdump-arm /data/local/</pre>
<p>Next login to your device by executing the following adb shell command</p>
<pre>$ ./adb shell</pre>
<p>Once logged in to your device, navigate to the directory where you stored the tcpdump binary and gain root privileges.</p>
<pre>$ cd data/local
$ su</pre>
<p>Start the tcpdump binary and save the captured packets to file.</p>
<pre>$ tcpdump-arm -s 0 -w out.txt</pre>
<p>The -s 0 argument is necessary to capture the whole packets instead of only the first x bytes. The -w out.txt writes the captured packets to file.</p>
<p>Every network packet that passes your network connection will be recorded in the file out.txt. Now you can launch the app you&#8217;re debugging (if it isn&#8217;t already running) and use the functionality of which you want to inspect the network traffic.</p>
<p>When you think you have captured enough network traffic for analysis, press Ctrl+C in your terminal to stop the tcp-dump process.</p>
<p>Copy the resulting file out.txt back to your computer by exiting the device shell and executing the adb pull command.</p>
<pre>$ exit
$ ./adb pull /data/local/out.txt /home/steven/out.txt</pre>
<p>That&#8217;s it, you&#8217;re done. Now you can either analyse the network traffic by hand by reading the file with your favorite text editor or you can load it into a network analysis tool like <a title="Wireshark" href="http://www.wireshark.org/">Wireshark</a>.</p>
<p>Happy debugging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/android-debugging-inspectin-network-traffic-with-tcpdump/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quickcopy : an Android app for managing frequently used text snippets</title>
		<link>http://www.vbsteven.be/blog/quickcopy-an-android-app-for-managing-frequently-used-text-snippets/</link>
		<comments>http://www.vbsteven.be/blog/quickcopy-an-android-app-for-managing-frequently-used-text-snippets/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 16:38:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=208</guid>
		<description><![CDATA[I&#8217;ve had this idea for a new Android app in my head for a few days and today I finally took some time to implement it.
Quickcopy
Quickcopy is a little application that lets you store little text snippets that you otherwise need to type frequently. For example an email address or a difficult to type login [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had this idea for a new Android app in my head for a few days and today I finally took some time to implement it.</p>
<h2>Quickcopy</h2>
<p>Quickcopy is a little application that lets you store little text snippets that you otherwise need to type frequently. For example an email address or a difficult to type login to some website.</p>
<p>Whenever you need one of these snippets in an application you just launch Quickcopy, tap the snippet you need and go back to your application where you can then paste the snippet.</p>
<p><img class="aligncenter size-full wp-image-210" title="quickcopy1" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/quickcopy1.png" alt="quickcopy1" width="320" height="480" /><img class="aligncenter size-full wp-image-211" title="quickcopy2" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/quickcopy2.png" alt="quickcopy2" width="320" height="480" /></p>
<p>The first version of Quickcopy is already available on the market. The features currently implemented are</p>
<ul>
<li>Add entries via the menu button</li>
<li>Copy entry to clipboard by tapping</li>
<li>Edit entry by long pressing</li>
<li>Delete entry by long pressing</li>
<li>View instructions via the menu button</li>
</ul>
<p>To download this application use the barcode scanner app to scan the following barcode or manually browse to Quickcopy in the Android Market app.</p>
<p><img class="aligncenter size-full wp-image-212" title="quickcopybar" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/quickcopybar.png" alt="quickcopybar" width="120" height="120" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/quickcopy-an-android-app-for-managing-frequently-used-text-snippets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android : getting the contact name of a phone number</title>
		<link>http://www.vbsteven.be/blog/android-getting-the-contact-name-of-a-phone-number/</link>
		<comments>http://www.vbsteven.be/blog/android-getting-the-contact-name-of-a-phone-number/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 11:05:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[contacts]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=200</guid>
		<description><![CDATA[As a new feature in my Android app for the belgian mobile phone carrier Mobile Vikings I wanted to display contact names in the call history instead of the number. After a bit of googling I found that Android provides a few contentproviders holding the data I needed (contact names and phone numbers).
In a first [...]]]></description>
			<content:encoded><![CDATA[<p>As a new feature in my Android app for the belgian mobile phone carrier Mobile Vikings I wanted to display contact names in the call history instead of the number. After a bit of googling I found that Android provides a few contentproviders holding the data I needed (contact names and phone numbers).</p>
<p>In a first attempt I retrieved all contacts with a simple query on the Contacts.Phone contentprovider, manually looped over the results and compared each number with the number I wanted to replace. This worked only when the number on the phone was stored exactly in the same format as the Mobile Vikings API returned it. If the Mobile Vikings api returned the number with the area code and the number was stored on the phone without the area code, no match was found.</p>
<p>After trying to figure out how I could get both numbers in the same format for comparison I figured out that Android provided a mechanism to do this. I could encode a phone number string into a filter URI provided by the Contacts.Phones contentprovider and use that filter to query on.</p>
<p>The code looks like this</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> getContactNameFromNumber<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> number<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// define the columns I want the query to return</span>
		<span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> projection <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>
				Contacts.<span style="color: #006633;">Phones</span>.<span style="color: #006633;">DISPLAY_NAME</span>,
				Contacts.<span style="color: #006633;">Phones</span>.<span style="color: #006633;">NUMBER</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// encode the phone number and build the filter URI</span>
		Uri contactUri <span style="color: #339933;">=</span> Uri.<span style="color: #006633;">withAppendedPath</span><span style="color: #009900;">&#40;</span>Contacts.<span style="color: #006633;">Phones</span>.<span style="color: #006633;">CONTENT_FILTER_URL</span>, Uri.<span style="color: #006633;">encode</span><span style="color: #009900;">&#40;</span>number<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// query time</span>
		<span style="color: #003399;">Cursor</span> c <span style="color: #339933;">=</span> getContentResolver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">query</span><span style="color: #009900;">&#40;</span>contactUri, projection, <span style="color: #000066; font-weight: bold;">null</span>,
				<span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// if the query returns 1 or more results</span>
		<span style="color: #666666; font-style: italic;">// return the first result</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">moveToFirst</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003399;">String</span> name <span style="color: #339933;">=</span> c.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span>c
					.<span style="color: #006633;">getColumnIndex</span><span style="color: #009900;">&#40;</span>Contacts.<span style="color: #006633;">Phones</span>.<span style="color: #006633;">DISPLAY_NAME</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">return</span> name<span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// return the original number if no match was found</span>
		<span style="color: #000000; font-weight: bold;">return</span> number<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The result looks like this</p>
<p><img class="aligncenter size-full wp-image-203" title="contactnames" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/contactnames.png" alt="contactnames" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/android-getting-the-contact-name-of-a-phone-number/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Wave Security issue with gadgets</title>
		<link>http://www.vbsteven.be/blog/google-wave-security-issue-with-gadgets/</link>
		<comments>http://www.vbsteven.be/blog/google-wave-security-issue-with-gadgets/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 14:09:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Beta reviews]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=192</guid>
		<description><![CDATA[In one of my previous posts about Google Wave I mentioned a security issue concerning gadgets. I decided to do a little more research on this subject and to do some experiments on some publicly available gadgets.
The issue
Before I get into detail about the issue, you need to know how Google Wave gadgets work. Gadgets [...]]]></description>
			<content:encoded><![CDATA[<p>In one of my previous posts about Google Wave I mentioned a security issue concerning gadgets. I decided to do a little more research on this subject and to do some experiments on some publicly available gadgets.</p>
<h2>The issue</h2>
<p>Before I get into detail about the issue, you need to know how Google Wave gadgets work. Gadgets are little pieces of html/javascript code that run inside of a wave. The state of a gadget is shared among every participant of the wave. Developers can access variables in this state by executing wave.getState().get(&#8217;name_of_variable&#8217;). To save or update variables into the state the following function exists. wave.getState().submitDelta({&#8217;name_of_variable&#8217;: value})</p>
<p>This last function is what bothers me about the way gadgets work. The wave server accepts any data that submitDelta passes on without any form of validation or authentication. As javascript is a clientside interpreted language that is executed inside of the browser, any user with the firebug extension (or some other debugging app/plugin) can alter that running code and manipulate these gadgets in ways that are not intended.</p>
<h2>Some examples</h2>
<p>Google Wave developer sandbox users should be familiar with the public &#8220;Wanna buy a wave t-shirt&#8221; wave. It is a wave to show of a simple counter gadget that is explained in the gadget api docs. the gadget has a button and a label. Every time the button is clicked the value in the label is incremented by one. The code for handling the buttonclick looks like this.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> buttonClicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #003366; font-weight: bold;">var</span> value <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submitDelta</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">:</span> value <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see the code retrieves the current value of &#8216;count&#8217; from the state, stores it in a variable &#8216;value&#8217; and then pushes that value+1 back to the server with submitDelta(). To try something out I placed a breakpoint just before the new value was submitted back to the server, changed the value of &#8216;value&#8217; to &#8216;99999&#8242; and hit continue. As expected, the wave server accepted my altered value and pushed the new state to every user currently participating that wave.</p>
<p>In the gadget api docs there is an auction gadget available which demonstrates the use of wave participants. This gadget lets wave participants place bids. The gadget displays the name and picture of the highest bidder together with the amount. The bidding code looks like this.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">function</span> buttonClicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> viewerId <span style="color: #339933;">=</span> wave.<span style="color: #660066;">getViewer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> state <span style="color: #339933;">=</span> wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> bid <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'yourBid'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> currentBid <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>state.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span>viewerId<span style="color: #339933;">,</span> <span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>bid <span style="color: #339933;">&gt;</span> currentBid<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        delta <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        delta<span style="color: #009900;">&#91;</span>viewerId<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> bid<span style="color: #339933;">;</span>
        state.<span style="color: #660066;">submitDelta</span><span style="color: #009900;">&#40;</span>delta<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>What I did here was : I placed a breakpoint after the viewerId was retrieved from the wave. This viewerId held my email address because I was the one viewing the gadget. I replaced this email-address with an address from another participant inside that wave and changed the value of the bid variable to 99999. After I hit continue to execute the remaining code, again my changes were accepted by the server and I had successfully placed a bid in someone else&#8217;s name. The updated state was once again pushed onto every wave participant&#8217;s gadget and they all got to see my victim&#8217;s name, picture and 99999 bidding amount.</p>
<h2>Solution</h2>
<p>What can developers do to prevent this abuse? Well, as long as we have no control over how the waveserver validates input received from submitDelta() there is not much we can do. If you really need serverside validation for your gadget then I think it is best to avoid the shared state and use an external server (on which you can execute validation code) to store your shared variables.</p>
<p>Some people may not consider this to be a security issue and will say it is just the way wave gadgets are supposed to work. As this may be true, I hope it&#8217;s not because this would limit the use of gadgets to fairly trivial appliances. </p>
<p>I have no idea what the Google Wave developers think of this. I am surely going to report this issue in the Google Wave issue tracker and keep you updated on the status.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/google-wave-security-issue-with-gadgets/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First look on Google Wave (Part 3) : Gadget API</title>
		<link>http://www.vbsteven.be/blog/first-look-on-google-wave-part-3-gadget-api/</link>
		<comments>http://www.vbsteven.be/blog/first-look-on-google-wave-part-3-gadget-api/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 00:12:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Beta reviews]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[developer sandbox]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=162</guid>
		<description><![CDATA[This is part 3 of my Google Wave developer sandbox review. Part 1 and part 2 were both an introduction to some wave concepts. In this part we&#8217;ll be taking a look at the Google Wave Gadget API by writing a simple rating gadget. If you don&#8217;t know what gadgets are or what they do, [...]]]></description>
			<content:encoded><![CDATA[<p>This is part 3 of my Google Wave developer sandbox review. <a href="http://www.vbsteven.be/blog/first-look-at-google-wave-developer-sandbox-part-1/">Part 1</a> and <a href="http://www.vbsteven.be/blog/first-look-on-google-wave-part-2-advanced-features/">part 2</a> were both an introduction to some wave concepts. In this part we&#8217;ll be taking a look at the Google Wave Gadget API by writing a simple rating gadget. If you don&#8217;t know what gadgets are or what they do, please read my previous post <a href="http://www.vbsteven.be/blog/first-look-on-google-wave-part-2-advanced-features/">here</a>.</p>
<h2>The gadget</h2>
<p>The gadget I have written is supposed to be used when you want wave participants to rate something inside your wave (or the wave itself). You simply add the gadget to your wave, set the title and you&#8217;re good to go. I also wanted the gadget to have a settings menu that was only visible by the person who added the gadget to the wave.</p>
<p><img class="aligncenter size-full wp-image-165" title="Rate me gadget" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/Screenshot-Steven-24-Google-Wave-Shiretoko.png" alt="Rate me gadget" width="478" height="442" /></p>
<p>The full source of this gadget is available at <a href="http://vbsteven.be/wave/rateme.xml ">http://vbsteven.be/wave/rateme.xml </a>. You can add the gadget to one of your own waves by choosing extensions/add gadget in the debug menu and then pasting the url into the textbox at the bottom of the dialog.</p>
<h2>Basic code layout</h2>
<p>Google Wave Gadgets are simple xml files with html and javascript code embedded in them.</p>
<p>As you can see <a href="http://vbsteven.be/wave/rateme.xml">here</a>, this is just an xml file with some wave-specific settings at the top like the title and the height of the gadget. Then there is a CDATA block which contains all our code. At the top of this block you&#8217;ll find the javascript includes (for JSON) and some javascript functions which define the behaviour of the gadget. At the bottom of the CDATA block you&#8217;ll find the HTML code which define the UI elements. When you want to use other external files (CSS for example), I suggest you link to those files at the top of the CDATA block.</p>
<h2>Initializing</h2>
<p>To initialize our gadget we need to define and register an init() method. This method will be called every time the gadget is loaded (for example when someone opens the wave). This method does not need to be long and is basically just to register the necessary callbackfunctions. In this case just the callback function that will notify our gadget when the shared state has changed is registered. As the shared state may not be fully initialized it is important that you don&#8217;t access the state object in this function.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>wave<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		wave.<span style="color: #660066;">setStateCallback</span><span style="color: #009900;">&#40;</span>stateUpdated<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
gadgets.<span style="color: #660066;">util</span>.<span style="color: #660066;">registerOnLoadHandler</span><span style="color: #009900;">&#40;</span>init<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Manipulating state</h2>
<p>It is very important to notice that the state of a gadget is shared among all participants of the wave. When one user performs an action that changes the state, this change will be reflected on every instance of that gadget that is currently open. The state of a gadget is represented by a state object that contains key-value pairs. Values can be retrieved from the state with the get(&#8217;key&#8217;) function and stored in the state with the submitDelta({&#8217;key&#8217; : value, &#8216;key&#8217; : value}) function.</p>
<p>Currently the state object only works with strings. So it is not possible to store complex objects or arrays into the state. When you do need to store a complex object or an array, you can convert the object to a JSON string for storage and parse that string back to an object after you get it back from the state. The documentation on the get and submitDelta functions wasn&#8217;t very clear to me at first, which led to me losing some time trying to figure out why my array of voters wouldn&#8217;t show up into the state object (thank you firebug).</p>
<p>You can find some examples of how to manipulate the shared state in my vote() and saveSettings() functions.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">		<span style="color: #003366; font-weight: bold;">function</span> vote<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> total <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'total'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> count <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> voters <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'voters'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'[]'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			total <span style="color: #339933;">+=</span> parseInt<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;rating&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span>
			count<span style="color: #339933;">++;</span>
			<span style="color: #003366; font-weight: bold;">var</span> rating <span style="color: #339933;">=</span> total<span style="color: #339933;">/</span>count<span style="color: #339933;">;</span>
			rating <span style="color: #339933;">=</span> rating.<span style="color: #660066;">toFixed</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			voters.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getViewer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
			<span style="color: #003366; font-weight: bold;">var</span> voters_json <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">stringify</span><span style="color: #009900;">&#40;</span>voters<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
			wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submitDelta</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">:</span> count<span style="color: #339933;">,</span> <span style="color: #3366CC;">'total'</span><span style="color: #339933;">:</span> total<span style="color: #339933;">,</span> <span style="color: #3366CC;">'rating'</span><span style="color: #339933;">:</span> rating<span style="color: #339933;">,</span> <span style="color: #3366CC;">'voters'</span><span style="color: #339933;">:</span> voters_json <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Reacting to a state-change</h2>
<p>If you registered your callbacks well, your stateUpdated() function should be called whenever a value changed in the shared state. This is the ideal time to get the updated state and update the UI. Most of the UI-related code should be in this function. Every time this function is called in my rateme gadget, I fetch the latest values from the state and update every UI component.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">		<span style="color: #003366; font-weight: bold;">function</span> stateUpdated<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> p_rating <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;p_rating&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'count'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				p_rating.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;rating : n/a&quot;</span><span style="color: #339933;">;</span>
				p_rating.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;
votes : 0&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
				p_rating.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;rating : &quot;</span> <span style="color: #339933;">+</span> wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rating'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				p_rating.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;
votes : &quot;</span> <span style="color: #339933;">+</span> wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'count'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #003366; font-weight: bold;">var</span> title <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;h2_title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			title.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> wave.<span style="color: #660066;">getState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Rate me'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>wave.<span style="color: #660066;">getViewer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> wave.<span style="color: #660066;">getHost</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// current user is the user that added the gadget to this wave</span>
				<span style="color: #003366; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;p_settings&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				p.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;a onclick=&quot;showSettings()&quot; href=&quot;#&quot;&gt;show settings&lt;/a&gt;'</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Getting user info</h2>
<p>Because I wanted to make a difference between the original user who added the gadget to the wave and the other users I had to have access to some user info. Luckily the wave object supplied by the API provides us with the necessary data. The wave.getParticipants() function returns an array of all users in the wave, getViewer returns the current viewer and getHost() returns the user that added the gadget to the wave. As you can see in the above code snippet, a simple equals check is enough to authenticate the user as the host and display the link tag.</p>
<h2>Security</h2>
<p>Ofcourse the authentication above looks easy. and it is,  but it also is a security issue. When you ask  any security specialist about AJAX apps, there is a very big chance he will say &#8220;Never trust the client&#8221;. And he&#8217;s right, as all javascript code is run inside the browser, any kid with firebug installed can alter that code. If you take a look at the above code sample you&#8217;ll see that a simple if (true) is enough to gain access to the settings panel.</p>
<p>In a normal webapp this wouldn&#8217;t be such a big deal. Even when the malicious user gained access to the settings by messing with the clientcode, the server would still verify every action and will prevent unauthorised actions. Because our gadget runs inside of google wave and we have no control over the code running on google servers, there is no way to validate the user input on the server and therefore the server will accept this user input.</p>
<p>Because of this issue there is no real safe way to handle authentication so every user inside the wave is able to alter the shared state, making gadgets unsafe for sensitive data.</p>
<h2>My opinion</h2>
<p>In my opinion the Google Wave gadget api is very easy to work with. As gadgets are written in plain html/javascript, webdevelopers with some experience in js won&#8217;t have a problem writing apps for the Google Wave platform. Although I&#8217;m still rather new to javascript (only did some basic ajax programming in school), I didn&#8217;t have any major problems while writing this little gadget. The api itself is very simple, straightforward and well-documented with very good code-samples.</p>
<p>On the downside, because of the security issue mentioned above I&#8217;m afraid gadgets will be limited to simple apps handling unimportant data (games, polls, etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/first-look-on-google-wave-part-3-gadget-api/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First look on Google Wave (Part 2) : Advanced features</title>
		<link>http://www.vbsteven.be/blog/first-look-on-google-wave-part-2-advanced-features/</link>
		<comments>http://www.vbsteven.be/blog/first-look-on-google-wave-part-2-advanced-features/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 19:04:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Beta reviews]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[sandbox]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=133</guid>
		<description><![CDATA[As the first part of my Google Wave developer sandbox review handled basic usage, this article will be about some more advanced features currently in the Google Wave developer sandbox.
Attachments
Adding attachments to a wave works similar to adding attachments to an email. You click the attachment button, select one or more files, click submit and [...]]]></description>
			<content:encoded><![CDATA[<p>As the <a href="http://www.vbsteven.be/blog/first-look-at-google-wave-developer-sandbox-part-1/">first part of my Google Wave developer sandbox review</a> handled basic usage, this article will be about some more advanced features currently in the Google Wave developer sandbox.</p>
<h2>Attachments</h2>
<p>Adding attachments to a wave works similar to adding attachments to an email. You click the attachment button, select one or more files, click submit and voila. Your files are uploaded to and displayed inside the wave.</p>
<p>You can attach almost any filetype to a wave. In case you have one or more image files the thumbnails of these files are displayed inside the wave. When you click on a thumbnail the larger image is displayed on a dark background. When there are multiple images added to a wave you can browse them by clicking the image button at the bottom and selecting &#8220;view as slideshow&#8221;.</p>
<p><img class="aligncenter size-full wp-image-146" title="Screenshot-Steven (12+) - Google Wave - Google Chrome" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/Screenshot-Steven-12+-Google-Wave-Google-Chrome.png" alt="Screenshot-Steven (12+) - Google Wave - Google Chrome" width="530" height="522" /></p>
<p><img class="aligncenter size-full wp-image-149" title="Screenshot-Steven (12+) - Google Wave - Google Chrome-1" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/Screenshot-Steven-12+-Google-Wave-Google-Chrome-1.png" alt="Screenshot-Steven (12+) - Google Wave - Google Chrome-1" width="530" height="293" /></p>
<p>When uploading other filetypes, Google Wave tries to guess the contenttype of each file in order to display a fitting icon. This feature seems to work quite well. When I added a .air installation file to a wave, the wave correctly identified that file as a zip file and displayed the corresponding icon. After adding a pdf file, a preview of the file is displayed. Clicking on a non-image file in a wave results in a download of that file.</p>
<p>When you have the correct Gears plugin for your browser you should be able to add attachments to your waves by dragging them from your desktop into the wave. Because this feature didn&#8217;t work out of the box with any of my browsers and I didn&#8217;t have the time to figure it out, I decided to leave it for now.</p>
<h2>Gadgets</h2>
<p>Gadgets are small pieces of software you can attach to a wave to add custom functionality. Gadgets can be as simple as a counter that counts how many times a button has been clicked or as advanced as an embedded map displaying the current GPS location of the wave users.</p>
<p><img class="aligncenter size-full wp-image-151" title="Screenshot-Steven (14+) - Google Wave - Google Chrome" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/08/Screenshot-Steven-14+-Google-Wave-Google-Chrome.png" alt="Screenshot-Steven (14+) - Google Wave - Google Chrome" width="531" height="562" /></p>
<p>The state of a gadget is shared among wave users. This means that when one user changes the state of a gadget, this change is visible for every user inside that wave. For example when a Google Maps gadget is embedded in a wave and user A is zooming in on a city, the gadget on user B&#8217;s screen will synchronize and automatically zoom in on the same city.</p>
<p>Adding a gadget is currently done via the debug menu. After choosing debug/extensions/add gadget, a popup is displayed with a list of available gadgets and a textbox to add custom gadgets stored somewhere on the net. Google Wave has a few default gadgets including : a chess game, a Google Maps gadget and a &#8220;Who is coming&#8221; gadget. At the moment I have not tried to add some custom gadgets yet, I will see how that goes when I write my first own gadget one of these days.</p>
<h2>Robots</h2>
<p>Robots are a little different from gadgets. A robot is an automated participant in a wave that interacts with it just like normal users do. You add a robot to a wave just like you would add another user. First you add the robot to your list of contacts (each robot is identified with a unique email address) and then you start a new wave with it or add it to an existing wave. Robot&#8217;s can interact with wave users in all sorts of ways. They can reply to messages, edit messages, create waves, add attachments, &#8230;</p>
<p>There are already quite a few nice robots out there for use with the Google Wave developer sandbox. Some of them are developed by the Google developers (Tweety &#8211; a twitter robot, Spelly &#8211; a spell checker, Stocky &#8211; a stock checker) and some other robots are developed by external developers (<a href="http://www.cihanduruer.com/archive/2009/06/12/google-wave-robots-and-humans-looking-like-a-same.aspx">Roshambo</a> &#8211; a rock paper scissors robot &#8211; is currently the only non-google robot I have tried).</p>
<h2>Debug menu</h2>
<p>The Google Wave developer sandbox comes with a handy debug menu. This menu has items for developers to check network information, check wave information, set the window size (not working in chrome dev build here atm) and generate/throw exceptions for debugging. At the moment also non-developers need this menu as it is the only way (that I know of) to add gadgets to a wave.</p>
<p>I haven&#8217;t had the chance to check out how most of these functions work as I haven&#8217;t written any code for the platform yet. Once I start developing a gadget and a robot I will probably use this menu a little bit more and have something more to say about it.</p>
<h2>Wrapping up again</h2>
<p>This post wasn&#8217;t very long as it was just an introduction to a few advanced concepts in the Google Wave developer sandbox. Today I will start experimenting with the gadget and robot API and in the next post I will talk about my experiences developing for the Google Wave platform. I already have an idea for the gadget but still no clue for the robot. Idea&#8217;s are suggestions are still welcome. You can leave a comment or contact me via my new contact page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/first-look-on-google-wave-part-2-advanced-features/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>First look at Google Wave developer sandbox (Part 1)</title>
		<link>http://www.vbsteven.be/blog/first-look-at-google-wave-developer-sandbox-part-1/</link>
		<comments>http://www.vbsteven.be/blog/first-look-at-google-wave-developer-sandbox-part-1/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 21:31:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Beta reviews]]></category>
		<category><![CDATA[developer sandbox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Wave]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=96</guid>
		<description><![CDATA[Two days after I got my invitation to the Ubuntu One beta and wrote a review about my first impressions I also received an invitation to join the Google Wave developer sandbox. As my Ubuntu One review was pretty popular (had about 1k pageviews the first day &#8211; thank you dzone.com users), I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Two days after I got my invitation to the Ubuntu One beta and wrote a <a href="http://www.vbsteven.be/blog/first-look-at-ubuntu-one-beta/">review about my first impressions</a> I also received an invitation to join the Google Wave developer sandbox. As my Ubuntu One review was pretty popular (had about 1k pageviews the first day &#8211; thank you dzone.com users), I decided to write something down about my first Google Wave experiences.</p>
<p>I will divide the review into a few separate pieces. This post will handle the general Google Wave Sandbox stuff, things I noticed when I first used the service. A second post will handle some advanced wave concepts like search, attachments, gadgets and robots. The last two posts will be about writing a gadget and a robot on the platform. I still have no idea about what kind of gadget and robot to write so if you have any suggestions/ideas, please leave a comment at the bottom of this page.</p>
<h2>What is Google Wave</h2>
<p>For those of you who are not familiar with Google Wave I suggest you check out <a href="http://wave.google.com/">wave.google.com</a> and watch the awesome introduction as it was presented at Google I/O 2009. Basically Google Wave is a commuication and collaboration tool for the web that tries to combine emailing, instant messaging and online collaboration into waves. A wave is a kind of thread t that is shared among users. Participants in a wave can leave messages for eachother, chat IM style, share photos, play games and add gadgets (like google maps for example) or robots (automated participants with a certain functionality).</p>
<h2>Registration</h2>
<p>After receiving my invitation to join the Google Wave developer sandbox I had to fill out a registration form with some personal data as well as three possible nicknames. Minutes after submitting I received another email stating that my account was created with my desired username (stevenvb) along with a second account for testing purposes (stevenvb-test). The addition of a second account for testing was a nice surprise as I didn&#8217;t have any friends with accounts on the sandbox.</p>
<h2>First login</h2>
<p>Full of excitement I clicked the link that would take me to the sandbox. Instead of the login screen I was greeted with a simple html document that stated that Google Wave did not support my current browser (I was using Firefox 3.5.1 on a 64bit ubuntu 9.04 box). At the moment Google suggests you use either Chrome/Chromium, FF 3.0+ or safari 3.0 so I launched my Chrome development build for linux and logged in succesfully.</p>
<p><img class="aligncenter size-full wp-image-122" title="wave-overview" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/wave-overview.png" alt="wave-overview" width="500" height="360" /></p>
<p>After the first login on both accounts I was forced to change my password to something else than the auto-generated one from the invitation and finally I got to see some Google Wave action. The first thing I did was add my test account to my contacts and ofcourse opened a wave and added my test account. I opened a second browser window to login with my test account and started sending some basic messages back and forth in the wave.</p>
<h2>Basic usage</h2>
<p>Simple wave editing is pretty intuitive. When you start a new wave or click the edit or reply button on an existing message the editor pops up and you are presented with a few buttons to format your text. Because I had two browser windows open side by side I could see the &#8220;update-as-you-type&#8221; feature in action. When I was typing something on one account, the other account could follow what was being typed almost character by character. In my case the message was updated about once every 2 letters. The following two screenshots demo this behaviour.</p>
<p><img class="aligncenter size-full wp-image-117" title="Wave Text Editor" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/texteditor2.png" alt="Wave Text Editor" width="404" height="296" /></p>
<p><img class="aligncenter size-full wp-image-116" title="Update-as-you-type" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/texteditor1.png" alt="Update-as-you-type" width="398" height="191" /></p>
<p>As you can see there is a Draft button available in the editor to disable this behaviour so the other participants can&#8217;t see your progress unless you click done. Unfortunately this feature is not implemented yet so the draft button is disabled.</p>
<p>The next morning when I logged in again I was surprised to find my inbox to be full of messages. I found this odd because except for my test account I had noone else in my contact list. After checking out some of the messages it became clear that there was an email adress (wave-discuss@wavesandbox.com) which you could add to any wave you made to make that wave publicly available to all sandbox users.</p>
<p>It bothered me at first to have so many unread waves all jumping up to the top of my inbox every time someone else added a new reply so I quickly discovered a solution. I added a new search with the following query &#8220;-with:wave-discuss@wavesandbox.com&#8221;. This query would give me all waves in my inbox except those with the previously mentioned public email address. By doing this I also discovered that besides the wave-discuss adress there also were some other public addresses. There also were some public waves &#8211; created by the Google devs themselves &#8211; which had info about the latest changes and bugs in them.</p>
<p>When checking out these &#8220;patch notes&#8221; I tried out the playback function which works really nice. This feature helped me a lot in understanding the discussions that went on. The playback function takes a wave and presents you every change step by step in chronological order. This makes browsing a wave with over 100 participants and as much replies as easy as following a thread on a discussion board.</p>
<h2>When something goes wrong&#8230;</h2>
<p>When something goes wrong, and it will because the software is still in its alpha stages, a textbox pops up on top of the screen in which you can type what you were doing to notify the Google devs that something has failed and they can try to fix it.</p>
<p><img class="aligncenter size-full wp-image-110" title="whensomethinggoeswrong" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/whensomethinggoeswrong.png" alt="whensomethinggoeswrong" width="400" height="56" /></p>
<p>When a wave itself has some issues it will notify you with a popup on top of the wave that mentions the wave in particular has some turbulence and it advises you to reopen that wave.</p>
<p>In the few days that I have used Google Wave it has never made my browser crash, which is a very good thing. I had a few &#8220;Dr. wave&#8221; popups notifying me there was something wrong internally but everytime one popped up I gladly filled out the form to notify the devs about what I was doing.</p>
<h2>Wrapping up</h2>
<p>All in all I had a very good first experience in the Google Wave developer sandbox. There are still some features to be implemented, bugs to fix and performance tweaks to be done but it definitely looks promising. I can&#8217;t wait to start developing some gadgets and robots for this platform, which I will blog about soon so be sure to check this site for updates every now and then. My next post will be about some more advanced features of the Google Wave developer sandbox like the usage of attachments, gadgets, robots and the debug menu.</p>
<p>I hope some of you found this post helpful or informative. If you have any comments about this post or have suggestions about the upcoming ones please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/first-look-at-google-wave-developer-sandbox-part-1/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>First look at Ubuntu One beta</title>
		<link>http://www.vbsteven.be/blog/first-look-at-ubuntu-one-beta/</link>
		<comments>http://www.vbsteven.be/blog/first-look-at-ubuntu-one-beta/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 09:53:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu One]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=77</guid>
		<description><![CDATA[Yesterday I received my invitation to the Ubuntu One beta. I played around with it for a few hours and these are my opinions.
What is Ubuntu One
For those who haven&#8217;t heard of it, Ubuntu One is a service that provides remote storage that integrates well with the Ubuntu Desktop. It allows you to share files [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I received my invitation to the Ubuntu One beta. I played around with it for a few hours and these are my opinions.</p>
<h2>What is Ubuntu One</h2>
<p>For those who haven&#8217;t heard of it, <a href="https://ubuntuone.com/">Ubuntu One</a> is a service that provides remote storage that integrates well with the Ubuntu Desktop. It allows you to share files between multiple machines, access these files from anywhere in the world via a webbased client and share your files with other Ubuntu One users.</p>
<h2>Installation</h2>
<p>After receiving my beta invitation I was asked to choose a subscription plan. Ubuntu one provides a free subscription plan with 2gb of storage and a paid plan with 10gb of storage for $10.00/month. I chose the free plan for now. After finishing my subscription I was presented some very clear installation instructions. Installation of Ubuntu One is as simple as installing 2 software packages. First the PPA which enables the Ubuntu One repository, then the actual software from the new repository.</p>
<p>When I first ran the software I was redirected to the website of Ubuntu One where I could login and add my computer to my Ubuntu One account.</p>
<h2>Usage</h2>
<p>Using Ubuntu One is as simple as just copying or creating files in the newly created folder on your harddrive.</p>
<p><img class="aligncenter size-full wp-image-78" title="Screenshot-Ubuntu One - File Browser" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/Screenshot-Ubuntu-One-File-Browser.png" alt="Screenshot-Ubuntu One - File Browser" width="485" height="379" /></p>
<p>When you add or change files to the local Ubuntu One folder an icon in the notification area starts rotating to let you know the software is synchronizing the local and remote filesystems.</p>
<p><img class="aligncenter size-full wp-image-81" title="Screenshot_notification_area" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/Screenshot_notification_area.png" alt="Screenshot_notification_area" width="146" height="25" /></p>
<p>After synchronization your files are available from the webclient. In this webclient you can view and download your current directories and files as well as upload new files or create subdirectories. You can share files with other Ubuntu One users by selecting a file, clicking on the &#8220;sharing&#8221; button and entering the email address of the person you want to share the file with.</p>
<p>The &#8220;Shared with me&#8221; folder contains the files or folders from other Ubuntu One users that have shared something with you.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-83" title="Screenshot-Ubuntu One : File Sharing - Shiretoko" src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/Screenshot-Ubuntu-One-File-Sharing-Shiretoko.png" alt="Screenshot-Ubuntu One : File Sharing - Shiretoko" width="610" height="511" /></p>
<p style="text-align: left;">When you have another computer linked to your Ubuntu One account the new or updated files will be visible after you trigger a sync from thet computer.</p>
<h2 style="text-align: left;">Issues</h2>
<p>When I added some files via the web client and wanted to sync the remote and local folders I couldn&#8217;t find a synchronize button. I had to manually click the disconnect and reconnect buttons on the notification icon for the synchronization to kick in. Another way to start the synchronization from remote to local was by adding or changing a file in the local folder. This would trigger a synchronization and the new remote files became visible locally.</p>
<p>When adding new folders in the webclient it looks like the folder is added twice. This looks like a minor UI problem because after a refresh or a sync the folder is displayed only once as it is supposed to be.</p>
<p>The web client doesn&#8217;t have a refresh button, after a sync you have to manually refresh the page to view the new state of the remote folders</p>
<h2 style="text-align: left;">My thoughts</h2>
<p>Although Ubuntu One is still in its beta stage and still has some issues I am certain this will become a very userfriendly way of sharing documents between multiple machines or among friends. Because of it&#8217;s tight integration with the Ubuntu desktop and thus synchronizing files is as easy as copying or saving them to a folder, even the most non-technical users are able to share data without the use of USB-sticks or email attachments.</p>
<p>I encourage everyone interested in the service to apply for the <a href="https://ubuntuone.com/">beta</a> and to start reporting issues so this project can get out of beta soon and become another valuable addition to the Ubuntu desktop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/first-look-at-ubuntu-one-beta/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Using the SimpleAdapter with a ListView in Android</title>
		<link>http://www.vbsteven.be/blog/using-the-simpleadapter-with-a-listview-in-android/</link>
		<comments>http://www.vbsteven.be/blog/using-the-simpleadapter-with-a-listview-in-android/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 12:43:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[ListView]]></category>
		<category><![CDATA[SimpleAdapter]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=24</guid>
		<description><![CDATA[When writing the Call history part of my Android app for Mobile Vikings I wanted to display the calls and messages in a listview with their number, date/time and cost. Displaying some text values in a ListView isn&#8217;t that hard. I could use an ArrayAdapter object that takes an ArrayList of Calls and it would [...]]]></description>
			<content:encoded><![CDATA[<p>When writing the Call history part of my Android app for Mobile Vikings I wanted to display the calls and messages in a listview with their number, date/time and cost. Displaying some text values in a ListView isn&#8217;t that hard. I could use an ArrayAdapter object that takes an ArrayList of Calls and it would display the toString() method of each call in the ListView. What I wanted to do was display various attributes of each Call object (number, date, cost) in the ListView. Like this.</p>
<p><img src="http://www.vbsteven.be/blog/wp-content/uploads/2009/07/screenshotcalllog.png" alt="Calllog example" /></p>
<p>After some research I found out that the SimpleAdapter class was the way to go. The documentation on the <a title="SimpleAdapter" href="http://developer.android.com/reference/android/widget/SimpleAdapter.html" target="_blank">SimpleAdapter</a> class wasn&#8217;t very clear to me at first and there wasn&#8217;t a working codesample to demo the class so I decided to share my own code. </p>
<p>The SimpleAdapter class uses an ArrayList of Maps to hold the data. Each Map in the list represents the data for one row in the ListView. The mapping between the values in the Map and the TextViews in the layout file is done with two arrays. An array of Strings for the keys that need to be mapped and an array of ints with the id&#8217;s of the TextViews the data belongs to.</p>
<p>We&#8217;ll start of with the code for the layout file. This file describes how one row in our listview should look. I used a TableLayout because I wanted two columns. In the first column I have a LinearLayout with two TextViews. One for the number display and one for the time. The other column holds one TextView for the cost of the call.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>TableLayout xmlns<span style="color: #339933;">:</span>android<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://schemas.android.com/apk/res/android&quot;</span>
	android<span style="color: #339933;">:</span>layout_width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fill_parent&quot;</span> android<span style="color: #339933;">:</span>layout_height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;wrap_content&quot;</span>
	android<span style="color: #339933;">:</span>stretchColumns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> android<span style="color: #339933;">:</span>padding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;5dp&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>TableRow android<span style="color: #339933;">:</span>padding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;5dp&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>LinearLayout android<span style="color: #339933;">:</span>orientation<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;vertical&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>TextView android<span style="color: #339933;">:</span>textSize<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;16sp&quot;</span> android<span style="color: #339933;">:</span>textStyle<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bold&quot;</span>
				android<span style="color: #339933;">:</span>id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;@+id/callog_detail_sms_number&quot;</span> android<span style="color: #339933;">:</span>layout_width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fill_parent&quot;</span>
				android<span style="color: #339933;">:</span>layout_height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;wrap_content&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>TextView<span style="color: #339933;">&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>TextView android<span style="color: #339933;">:</span>textSize<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;16sp&quot;</span> android<span style="color: #339933;">:</span>id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;@+id/callog_detail_sms_date&quot;</span>
				android<span style="color: #339933;">:</span>layout_width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fill_parent&quot;</span> android<span style="color: #339933;">:</span>layout_height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;wrap_content&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>TextView<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>LinearLayout<span style="color: #339933;">&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>TextView android<span style="color: #339933;">:</span>textSize<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;16sp&quot;</span> android<span style="color: #339933;">:</span>id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;@+id/callog_detail_sms_price&quot;</span>
			android<span style="color: #339933;">:</span>layout_width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;wrap_content&quot;</span> android<span style="color: #339933;">:</span>layout_height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fill_parent&quot;</span><span style="color: #339933;">&gt;&lt;/</span>TextView<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;/</span>TableRow<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>TableLayout<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Next up is the java code I used to convert my List of Calls to the List of Maps and to map the correct values to the corresponding TextViews.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// get messages from service</span>
ArrayList<span style="color: #339933;">&lt;</span>Call<span style="color: #339933;">&gt;</span> smsMessages <span style="color: #339933;">=</span> service.<span style="color: #006633;">getSmsCalls</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// initialize the List of Maps</span>
List<span style="color: #339933;">&lt;</span>Map<span style="color: #339933;">&lt;</span>String, String<span style="color: #339933;">&gt;&gt;</span> list <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>Map<span style="color: #339933;">&lt;</span>String, String<span style="color: #339933;">&gt;&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// iterate over all messages </span>
<span style="color: #666666; font-style: italic;">// create a map for each message</span>
<span style="color: #666666; font-style: italic;">// fill the map with data</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>Call c<span style="color: #339933;">:</span> smsMessages<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	Map<span style="color: #339933;">&lt;</span>String, String<span style="color: #339933;">&gt;</span> map <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HashMap<span style="color: #339933;">&lt;</span>String, String<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;number&quot;</span>, c.<span style="color: #006633;">getTo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;date&quot;</span>, DateParser.<span style="color: #006633;">getTimeString</span><span style="color: #009900;">&#40;</span>c.<span style="color: #006633;">getBegin</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;price&quot;</span>, <span style="color: #0000ff;">&quot;€ &quot;</span> <span style="color: #339933;">+</span> c.<span style="color: #006633;">getPrice</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	list.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// the from array specifies which keys from the map </span>
<span style="color: #666666; font-style: italic;">// we want to view in our ListView</span>
<span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> from <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;number&quot;</span>, <span style="color: #0000ff;">&quot;date&quot;</span>, <span style="color: #0000ff;">&quot;price&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// the to array specifies the TextViews from the xml layout</span>
<span style="color: #666666; font-style: italic;">// on which we want to display the values defined in the from array</span>
<span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> to <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">callog_detail_sms_number</span>, R.<span style="color: #006633;">id</span>.<span style="color: #006633;">callog_detail_sms_date</span>, R.<span style="color: #006633;">id</span>.<span style="color: #006633;">callog_detail_sms_price</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// get a reference to the ListView</span>
<span style="color: #003399;">ListView</span> lv <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">ListView</span><span style="color: #009900;">&#41;</span>findViewById<span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">id</span>.<span style="color: #006633;">callog_detail_listview</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// create the adapter and assign it to the listview</span>
SimpleAdapter adapter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleAdapter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getApplicationContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, list, R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">callog_detail_sms</span>, from, to<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
lv.<span style="color: #006633;">setAdapter</span><span style="color: #009900;">&#40;</span>adapter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;s it. I hope this was helpfull to some of you. Improvements and comments are always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/using-the-simpleadapter-with-a-listview-in-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mobile Vikings app for Android</title>
		<link>http://www.vbsteven.be/blog/mobile-vikings-app-for-android/</link>
		<comments>http://www.vbsteven.be/blog/mobile-vikings-app-for-android/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 20:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile Vikings]]></category>

		<guid isPermaLink="false">http://www.vbsteven.be/blog/?p=5</guid>
		<description><![CDATA[Recently I bought myself a HTC Magic phone running the Android OS. After losing about € 10-15 on mobile internet connections in the first two days I decided to switch to the new mobile service provider Mobile Vikings. They offer 1000 sms messages and 1gb data transfer for € 15/month. The first thing I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I bought myself a HTC Magic phone running the Android OS. After losing about € 10-15 on mobile internet connections in the first two days I decided to switch to the new mobile service provider <a title="Mobile Vikings" href="http://mobilevikings.com/" target="_blank">Mobile Vikings</a>. They offer 1000 sms messages and 1gb data transfer for € 15/month. The first thing I noticed after the switch was the fact that there was no easy way to know how much credits/messages/data I had left on my account. I either had to call a free number or log in to the Mobile Vikings website to check my balance.</p>
<p>They had a public API available but nobody had written an android implementation so I decided to write one myself. After all it&#8217;s a nice way to introduce myself to the Android API. I started up eclipse, downloaded the SDK, read a little about the API and started coding. In about 40minutes I had a very basic app that downloaded the JSON data from the Mobile Vikings API, parsed it and put the remaining balance on the screen.</p>
<p>The days after that I implemented a settings menu where users could enter their credentials and enable/disable the auto-update feature of the app. As an introduction to Android appwidgets I tried to get a little widget working that showed the remaining credits/messages/data on the screen and I succeeded.</p>
<p>A few days ago I cleaned the code a little and put an early version of the app available for the users to test at <a title="http://code.google.com/p/mobilevikingsandroid/" href="http://code.google.com/p/mobilevikingsandroid/" target="_blank">http://code.google.com/p/mobilevikingsandroid/</a> . Please use the Issue tracker  when you encounter any issues or have feedback.</p>
<p>I am currently working on the next feature (the call history) so be sure to check back every once in a while for updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vbsteven.be/blog/mobile-vikings-app-for-android/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
