<?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>Substance of Code</title>
	<atom:link href="http://www.substanceofcode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.substanceofcode.com</link>
	<description>Software Artisan Tommi Laukkanen</description>
	<lastBuildDate>Wed, 10 Mar 2010 06:03:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Twim with Posterous and Themes Support</title>
		<link>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/</link>
		<comments>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 11:29:45 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[posterous]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[twim]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=683</guid>
		<description><![CDATA[I&#8217;ve been coding few new features to Twim like Posterous integration. Now you can post your photos to Posterous and it publishes the status with link on your Twitter feed. Check out for example my Posterous site so you&#8217;ll see how easy it is to create awesome looking blog with their service.
New version also includes [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coding few new features to <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim</a> like <a href="http://posterous.com">Posterous</a> integration. Now you can post your photos to Posterous and it publishes the status with link on your Twitter feed. Check out for example my Posterous <a href="http://tlaukkanen.posterous.com/">site</a> so you&#8217;ll see how easy it is to create awesome looking blog with their service.</p>
<p>New version also includes small themes feature so you can select from three themes: Default, Gray and Night. Gray theme is more traditional list style view to your Twitter feeds as shown here:</p>
<p><a title="IMG_6929 by tlaukkanen, on Flickr" href="http://www.flickr.com/photos/tlaukkanen/4410850288/"><img src="http://farm5.static.flickr.com/4065/4410850288_682f77c312.jpg" alt="IMG_6929" width="500" height="375" /></a></p>
<p>Download new version from <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">here</a> or use these shortcuts:</p>
<ul>
<li><a href="http://bit.ly/twim-jar">http://bit.ly/twim-jar</a></li>
<li><a href="http://bit.ly/twim-jad">http://bit.ly/twim-jad</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/03/06/twim-with-posterous-and-themes-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Task Manager v1.4</title>
		<link>http://www.substanceofcode.com/2010/02/27/mobile-task-manager-v1-4/</link>
		<comments>http://www.substanceofcode.com/2010/02/27/mobile-task-manager-v1-4/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 21:44:05 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=674</guid>
		<description><![CDATA[It&#8217;s been a while since the last update to any software. Now I had an inspiration to open up the NetBeans IDE and do some coding for the GTD app. This version includes few fixes:

Don&#8217;t crash when exported file already exists. Display readable error
Don&#8217;t export new line characters in notes as it invalidates the CSV

I [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since the last update to any software. Now I had an inspiration to open up the NetBeans IDE and do some coding for the GTD app. This version includes few fixes:</p>
<ul>
<li>Don&#8217;t crash when exported file already exists. Display readable error</li>
<li>Don&#8217;t export new line characters in notes as it invalidates the CSV</li>
</ul>
<p>I also added few improvements as well:</p>
<ul>
<li>Don&#8217;t add duplicate items when importing items from CSV</li>
<li>Very simple touch screen support (not tested on any device)</li>
</ul>
<p>I hope that you like the new version! You can download the v1.4 from <a href="http://code.google.com/p/mobile-task-manager/downloads/list">here</a>. For anyone interested in the source code you can browse or checkout the code from <a href="http://code.google.com/p/mobile-task-manager/source/checkout">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2010/02/27/mobile-task-manager-v1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with JavaScript, My Language of 2009</title>
		<link>http://www.substanceofcode.com/2009/12/31/playing-with-javascript-my-language-of-2009/</link>
		<comments>http://www.substanceofcode.com/2009/12/31/playing-with-javascript-my-language-of-2009/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 23:11:18 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=669</guid>
		<description><![CDATA[JavaScript has been around since 1995 but only since Web 2.0 techniques it has become a mainstream language to all developers. No matter if you are a mobile, server side or desktop developer you probably have touched some JavaScript in your career. Even latest operating systems like Palm WebOS and Google Chrome OS are using [...]]]></description>
			<content:encoded><![CDATA[<p>JavaScript has been around since 1995 but only since Web 2.0 techniques it has become a mainstream language to all developers. No matter if you are a mobile, server side or desktop developer you probably have touched some JavaScript in your career. Even latest operating systems like Palm <a href="http://en.wikipedia.org/wiki/WebOS">WebOS</a> and <a href="http://en.wikipedia.org/wiki/Google_Chrome_OS">Google Chrome OS</a> are using JavaScript as &#8220;native&#8221; programming language.</p>
<p>My first experiences ten years ago with JavaScript were limited only to simple functions like page refreshing or trivial actions when user pressed link or button. In the recent years I&#8217;ve been using more advanced features of JavaScript like AJAX. Modern JavaScript frameworks like <a href="http://jquery.com/">jQuery</a> have really boosted up the productivity on the UI development.</p>
<p>As a developer you might have read a good advice from <a href="http://pragprog.com/titles/tpp/the-pragmatic-programmer">Pragmatic Programmer</a> to learn a new language each year. I might say that JavaScript could be my language for 2009 even though I&#8217;ve been writing JavaScript nearly a decade.</p>
<div id="attachment_670" class="wp-caption alignnone" style="width: 440px"><a href="http://www.substanceofcode.com/apps/othellojs/othello.html"><img class="size-full wp-image-670" title="OthelloJS" src="http://www.substanceofcode.com/wp-content/uploads/2009/12/OthelloJS.png" alt="Othello Game" width="430" height="435" /></a><p class="wp-caption-text">Game of Othello</p></div>
<p>As a last JavaScript exercise of 2009 I crafted a small game of Othello by using only JavaScript and small chunks of HTML and CSS. It includes a decent AI opponent which uses <a href="http://en.wikipedia.org/wiki/Minimax">minmax</a> algorithm to find a good move. You can find the game <a href="http://www.substanceofcode.com/apps/othellojs/othello.html">here</a>. Let me know if the computer AI can beat you :)</p>
<p>It was a great year of 2009. Looking forward on the new gadgets and technologies of 2010!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/12/31/playing-with-javascript-my-language-of-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Babel Fish for Twitter &#8211; New Twim Release</title>
		<link>http://www.substanceofcode.com/2009/11/02/babel-fish-for-twitter/</link>
		<comments>http://www.substanceofcode.com/2009/11/02/babel-fish-for-twitter/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 20:56:00 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[twim]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=661</guid>
		<description><![CDATA[Google Translator is a great translator tool which has a very simple AJAX API that can be easily used from mobile apps. Compared to other translator tools it has one feature which other services don&#8217;t have, the auto detection of language.
The API is really easy to use. All you need to do is to pass [...]]]></description>
			<content:encoded><![CDATA[<p>Google Translator is a great translator tool which has a very simple <a href="http://code.google.com/apis/ajaxlanguage/">AJAX API</a> that can be easily used from mobile apps. Compared to other translator tools it has one feature which other services don&#8217;t have, the auto detection of language.</p>
<p>The API is really easy to use. All you need to do is to pass three parameters to the API call:</p>
<ol>
<li>Version, <em>v=1.0</em></li>
<li>Translated text, <em>q=Hei maailma!</em></li>
<li>Language pair (if source is empty then language is automatically identified), <em>langpair=|en</em></li>
</ol>
<p>In the end you end up with the following URL:</p>
<p><a href="http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;langpair=|en&amp;q=Hei+maailma!">http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;langpair=|en&amp;q=Hei+maailma!</a></p>
<p>And if you click the link you&#8217;ll see that it returns the translated text in JSON format which is pretty easy to parse.</p>
<pre style="word-wrap: break-word; white-space: pre-wrap;">{ "responseData": {
"translatedText":"Hello world!",
"detectedSourceLanguage":"fi" },
"responseDetails": null,
"responseStatus": 200}</pre>
<p>This made it pretty easy to integrate the API call to Twim. So now in Twim 1.6 you can select a tweet from status list and select &#8220;Translate to English&#8221; from status menu and Twim will display the translation to you in seconds. Pretty handy if you are following people from other countries in Twitter. Go ahead and download the latest Twim to your mobile phone from <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">here</a>.</p>
<p>&#8230;and by the way, new feature also has the &#8220;paging&#8221; feature for home screen and search results as a bonus! Happy Twittering!</p>
<p><a href="http://moby.to/d0rnbk" target="_blank"><img src="http://img.mobypicture.com/ca218d5668030657cfaa6a8cba7af572_view.jpg" alt="Posted using Mobypicture.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/11/02/babel-fish-for-twitter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>LWUIT 1.1 for Java ME Developers</title>
		<link>http://www.substanceofcode.com/2009/10/18/lwuit-1-1-for-java-me-developers/</link>
		<comments>http://www.substanceofcode.com/2009/10/18/lwuit-1-1-for-java-me-developers/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:42:52 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[lwuit]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=621</guid>
		<description><![CDATA[One of the problems with Java ME applications containing more advanced UI components have been that it is really painful to have it rendered consistently across different platforms and devices. I&#8217;ve used to implement my own set of practices on displaying lists of tweets in Twim or todo lists in Mobile Task Manager. Now I [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems with Java ME applications containing more advanced UI components have been that it is really painful to have it rendered consistently across different platforms and devices. I&#8217;ve used to implement my own set of practices on displaying lists of tweets in <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim/">Twim</a> or todo lists in <a href="http://www.substanceofcode.com/software/mobile-task-manager/">Mobile Task Manager</a>. Now I came across a nice looking UI library for Java ME called <a href="https://lwuit.dev.java.net/">LWUIT</a>.</p>
<p><a href="http://moby.to/ikb5mu" target="_blank"><img src="http://img.mobypicture.com/06854b2b58ab84a31801a85e3e697712_view.jpg" alt="Posted using Mobypicture.com" /></a></p>
<p>LWUIT supports such nice things like theming, transitions and animation. It also includes new UI components like TabbedPane and Dialogs.</p>
<p>I just got a new book to review, <a href="http://www.packtpub.com/lwuit-1-1-for-java-me-developers?utm_source=Substanceofcode.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_000381">LWUIT 1.1 for Java ME Developers</a>, written by <a href="http://java.net/pub/au/491">Biswajit Sarkar</a>. If you think that LWUIT could scratch your itch then I&#8217;d recommend on having this book on your desk as it works pretty nicely as a reference as well as good introduction to the whole library.</p>
<p>Book contains lots of emulator screenshots which help to understand the concepts very well. This combined with lots of sample code makes it really easy to learn all features of LWUIT library. Only one oddity is that it&#8217;s referencing to Sprint SDK where it could as well be the Sun&#8217;s original WTK but that doesn&#8217;t really have any affect on code samples.</p>
<p>Book&#8217;s first chapter is a good introduction to the library. The following chapters explain the default components and then there is one chapter on how to create a custom component. Last chapters dig into resources, LWUIT designer, themes, animations and transitions, painters, effects and logging. The index is also very complete which makes the book work well as a good resource in the bookshelf even after the first reading.</p>
<p>Check out the <a href="http://www.packtpub.com/lwuit-1-1-for-java-me-developers?utm_source=Substanceofcode.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_000381">publisher site</a> for more information about the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/10/18/lwuit-1-1-for-java-me-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Release, Mobile Task Manager v1.3</title>
		<link>http://www.substanceofcode.com/2009/10/13/new-release-mobile-task-manager-v1-3/</link>
		<comments>http://www.substanceofcode.com/2009/10/13/new-release-mobile-task-manager-v1-3/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 18:15:31 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[mobile-task-manager]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=644</guid>
		<description><![CDATA[I just uploaded the latest binaries (JAR and JAD) of Mobile Task Manager to Google Code download page. The previous version (v1.2) was already downloaded over 1700 times in less then a month so there seems to be a need for a good GTD / Task Manager application :)
This version fixes the issues with the [...]]]></description>
			<content:encoded><![CDATA[<p>I just uploaded the latest binaries (JAR and JAD) of <a href="http://www.substanceofcode.com/software/mobile-task-manager/">Mobile Task Manager</a> to Google Code <a href="http://code.google.com/p/mobile-task-manager/downloads/list">download page</a>. The previous version (v1.2) was already downloaded over 1700 times in less then a month so there seems to be a need for a good GTD / Task Manager application :)</p>
<p>This version fixes the issues with the export and import. Now you can export data to CSV file correctly and you can import that file either to root folder or to the folder that is currently selected.</p>
<p>This version also improves the startup time significantly. Application is ready to use in about three seconds after the launch on my Nokia E71.</p>
<p>Have fun while Getting Things Done with the Mobile Task Manager! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/10/13/new-release-mobile-task-manager-v1-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Mobile Task Manager Video</title>
		<link>http://www.substanceofcode.com/2009/09/29/mobile-task-manager-video/</link>
		<comments>http://www.substanceofcode.com/2009/09/29/mobile-task-manager-video/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:17:05 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[mobile-task]]></category>
		<category><![CDATA[mobile-task-manager]]></category>
		<category><![CDATA[todo]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=637</guid>
		<description><![CDATA[Pali Madra from E71 by Nokia blog created a very nice video of Mobile Task Manager running on Nokia E71. Check out the full review that he wrote on his blog, here.

]]></description>
			<content:encoded><![CDATA[<p>Pali Madra from <a href="http://e71bynokia.blogspot.com/">E71 by Nokia</a> blog created a very nice video of Mobile Task Manager running on Nokia E71. Check out the full review that he wrote on his blog, <a href="http://e71bynokia.blogspot.com/2009/09/mobile-smartphone-software-for-e71.html">here</a>.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/9iML32sMjKo&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9iML32sMjKo&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/09/29/mobile-task-manager-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting even more things done</title>
		<link>http://www.substanceofcode.com/2009/09/19/getting-even-more-things-done/</link>
		<comments>http://www.substanceofcode.com/2009/09/19/getting-even-more-things-done/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 18:44:40 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile-task-manager]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[tasks]]></category>
		<category><![CDATA[todo]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=624</guid>
		<description><![CDATA[When I crafted the Mobile Task Manager application this summer I didn&#8217;t expect it to have that good response in community. It was even mentioned in many blogs like Nokia Mobile Talk and even reviewed on one of my favorite Symbian sites, all about symbian.com, by Ewan Spence. Ewan pointed out good ideas how application [...]]]></description>
			<content:encoded><![CDATA[<p>When I crafted the <a href="http://www.substanceofcode.com/software/mobile-task-manager/">Mobile Task Manager</a> application this summer I didn&#8217;t expect it to have that good response in community. It was even mentioned in many blogs like <a href="http://www.nokiamobiletalk.com/2009/07/mobile-task-manager-a-gtd-application-for-nokia-smartphones-has-been-released/">Nokia Mobile Talk</a> and even reviewed on one of my favorite Symbian sites, <a href="http://www.allaboutsymbian.com/reviews/item/Mobile_Task_Manager.php">all about symbian.com</a>, by Ewan Spence. Ewan pointed out good ideas how application could be improved to be even better GTD application for mobile phones.</p>
<p><img class="alignnone size-full wp-image-625" title="Splash screen" src="http://www.substanceofcode.com/wp-content/uploads/2009/09/gtd-splash.png" alt="Splash screen" width="176" height="220" /> <img class="alignnone size-full wp-image-626" title="Task list" src="http://www.substanceofcode.com/wp-content/uploads/2009/09/gtd-list.png" alt="Task list" width="176" height="220" /></p>
<p>Last week I miraculously had few spare hours here and there and I was able to improve this app a little based on feedback written on the application page and based on Ewan&#8217;s review. Today I&#8217;m able to release the version 1.2 of the Mobile Task Manager with the following new features:</p>
<ul>
<li>You can prioritize todo items (none, low, normal, high)</li>
<li>Priority shown as flags (none, green, yellow, red)</li>
<li>Priority can be changed from item view (left/right key)</li>
<li>&#8230;or straight from item list with &#8216;0&#8242; shortcut key</li>
<li>You can sort items by name, done-status or priority</li>
<li>Import items from text file or CSV file</li>
<li>FIX: pressing &#8216;3&#8242; causes the item below the one highlighted to open up for editing</li>
<li>FIX: &#8220;Delete selected&#8221; will not delete the last entry on a folder</li>
<li>FIX: pressing &#8216;9&#8242; does not work for quick note editing</li>
</ul>
<p>Unfortunately I had to rename the JAR file in this release as it previously contained the version number so you can&#8217;t update your existing instance. From now on I&#8217;m keeping the same name (MobileGtd.jar) so future releases are going to update the existing installation. You can download the binaries (JAR/JAD files) from <a href="http://code.google.com/p/mobile-task-manager/downloads/list">here</a>.</p>
<p>Mobile Task Manager is still open source so if you like to check out the code you can do so in <a href="http://code.google.com/p/mobile-task-manager/source/browse/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/09/19/getting-even-more-things-done/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Twim 1.15 with Auto-Refresh and TwitrPix Support</title>
		<link>http://www.substanceofcode.com/2009/08/22/twim-1-15-with-auto-refresh-and-twitrpix-support/</link>
		<comments>http://www.substanceofcode.com/2009/08/22/twim-1-15-with-auto-refresh-and-twitrpix-support/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 10:49:52 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=602</guid>
		<description><![CDATA[Just finished testing the latest version of Twim, v1.15. Now you can also send your photos to new TwitrPix service.

I also added few options that you can configure via settings view. You can set Twim to automatically load the home screen tweets when application is started and you can also turn on the auto-refresh option [...]]]></description>
			<content:encoded><![CDATA[<p>Just finished testing the latest version of <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim">Twim</a>, v1.15. Now you can also send your photos to new <a href="http://twitrpix.com/">TwitrPix</a> service.</p>
<p><img class="alignnone size-full wp-image-617" title="twitrpix_logo_v2" src="http://www.substanceofcode.com/wp-content/uploads/2009/08/twitrpix_logo_v2.png" alt="twitrpix_logo_v2" width="241" height="90" /></p>
<p>I also added few options that you can configure via settings view. You can set Twim to automatically load the home screen tweets when application is started and you can also turn on the auto-refresh option that will automatically load new tweets in every 5 minutes. If new tweets are found then phone vibrates and plays a small beep sound. With this feature you won&#8217;t miss a single tweet again :)</p>
<div id="attachment_607" class="wp-caption alignnone" style="width: 186px"><img class="size-full wp-image-607" title="twim_settings" src="http://www.substanceofcode.com/wp-content/uploads/2009/08/twim_settings.png" alt="New settings view" width="176" height="220" /><p class="wp-caption-text">New settings view</p></div>
<p>Full release notes:</p>
<ul>
<li><a href="http://twitrpix.com">TwitrPix</a> support</li>
<li>Cancel option to media menu</li>
<li>Initial auto-refresh option with alarming of new tweets</li>
<li>Option to automatically load tweets on startup</li>
<li>Tab names changed: &#8220;Recent&#8221;&gt;&#8221;Home&#8221;, &#8220;Friends&#8221;&gt;&#8221;Following&#8221;</li>
<li>Fix for non-latin characters when posting photos (thanks Lexa!)</li>
</ul>
<p>Have fun with the new Twim and download it from <a href="http://www.substanceofcode.com/software/mobile-twitter-client-twim">here</a>. If you like the source code you can see that in <a href="http://code.google.com/p/twim/">here</a>. Twim is still free as a free beer.</p>
<p>In case you didn&#8217;t know: Twim is a mobile <a href="http://twitter.com/">Twitter</a> client. I&#8217;m twittering with username <a href="http://twitter.com/tlaukkanen">@tlaukkanen</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/08/22/twim-1-15-with-auto-refresh-and-twitrpix-support/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Coding Touchscreen Scrolling in Java ME</title>
		<link>http://www.substanceofcode.com/2009/07/29/coding-touchscreen-scrolling-in-java-me/</link>
		<comments>http://www.substanceofcode.com/2009/07/29/coding-touchscreen-scrolling-in-java-me/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 20:27:38 +0000</pubDate>
		<dc:creator>Tommi Laukkanen</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[MIDlet]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[scrolling]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[touchscreen]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.substanceofcode.com/?p=590</guid>
		<description><![CDATA[Here&#8217;s the trick how you can add touchscreen scrolling to your J2ME applications. The key to touchscreen support is the Canvas class and its&#8217; methods pointerPressed, pointerDragged and pointerReleased. These events are called when user puts finger on the screen (pressed) and drags the finger (dragged) and finally when removes the finger (released). Each method [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the trick how you can add touchscreen scrolling to your J2ME applications. The key to touchscreen support is the Canvas class and its&#8217; methods <em>pointerPressed, pointerDragged </em>and <em>pointerReleased</em>. These events are called when user puts finger on the screen (pressed) and drags the finger (dragged) and finally when removes the finger (released). Each method has the x and y coordinates for the pointer action.</p>
<p>The scrolling is implemented with the pointerDragged event. We store the current location of the canvas to variables <em>verticalLoc</em> and <em>horizontalLoc</em>. When finger (pointer) is dragged then location is changed according to the dragged amount. Variables are used on <em>paint</em> method to draw the area so that it is scrolled that correctly. You can also see from the sample code how you can draw background with repeatable pattern image.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">class</span> ScrollingCanvas <span class="kw2">extends</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACanvas+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Canvas</span></a> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">// Current location</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">private</span> <span class="kw4">int</span> verticalLoc, horizontalLoc;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;<span class="co1">// Last pointer (finger) location</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">private</span> <span class="kw4">int</span> lastX, lastY;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">// Background image size</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">private</span> <span class="kw2">static</span> <span class="kw2">final</span> <span class="kw4">int</span> IMAGE_WIDTH = <span class="nu0">183</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">private</span> <span class="kw2">static</span> <span class="kw2">final</span> <span class="kw4">int</span> IMAGE_HEIGHT = <span class="nu0">183</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">public</span> ScrollingCanvas<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;verticalLoc = <span class="nu0">0</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;horizontalLoc = <span class="nu0">0</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;setFullScreenMode<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">protected</span> <span class="kw4">void</span> paint<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AGraphics+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Graphics</span></a> g<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="co1">// Draw background with pattern image</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp;<span class="kw4">int</span> x = horizontalLoc % IMAGE_WIDTH;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span>x&gt;<span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;x -= IMAGE_WIDTH;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw4">int</span> origX = x;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw4">int</span> y = verticalLoc % IMAGE_HEIGHT;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span>y&gt;<span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;y -= IMAGE_HEIGHT;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw4">boolean</span> verticalDone = <span class="kw2">false</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">while</span><span class="br0">&#40;</span>!verticalDone<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw4">boolean</span> horizontalDone = <span class="kw2">false</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw1">while</span><span class="br0">&#40;</span>!horizontalDone<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp;g.<span class="me1">drawImage</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ImageRepository.<span class="me1">getBackground</span><span class="br0">&#40;</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x, y, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AGraphics+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Graphics</span></a>.<span class="me1">LEFT</span>|Graphics.<span class="me1">TOP</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;x += IMAGE_WIDTH;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span>x&gt;getWidth<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;horizontalDone = <span class="kw2">true</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;x = origX;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;y += IMAGE_HEIGHT;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span>y&gt;getHeight<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;verticalDone = <span class="kw2">true</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* Finger is pressed on screen</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @param x coordinate</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @param y coordinate</span></div>
</li>
<li class="li2">
<div class="de2"><span class="coMULTI">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">protected</span> <span class="kw4">void</span> pointerPressed<span class="br0">&#40;</span><span class="kw4">int</span> x, <span class="kw4">int</span> y<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;lastX = x;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;lastY = y;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* Finger is dragged on screen</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @param x coordinate</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @param y coordinate</span></div>
</li>
<li class="li2">
<div class="de2"><span class="coMULTI">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">protected</span> <span class="kw4">void</span> pointerDragged<span class="br0">&#40;</span><span class="kw4">int</span> x, <span class="kw4">int</span> y<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="co1">// Calculate how much we moved horizontally</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw4">int</span> deltaHorizontal = lastX &#8211; x;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;horizontalLoc -= deltaHorizontal;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp;lastX = x;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="co1">// Calculate how much we moved vertically</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw4">int</span> deltaVertical = lastY &#8211; y;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;verticalLoc -= deltaVertical;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp;lastY = y;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="co1">// Repaint the screen since we have scrolled</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;repaint<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Here is a video of running this demonstration app in Nokia N97 SDK emulator:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/tJ0X-uPJsmk&amp;hl=en&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/tJ0X-uPJsmk&amp;hl=en&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.substanceofcode.com/2009/07/29/coding-touchscreen-scrolling-in-java-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
