<?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>Mobile Programming Pit Stop</title>
	<atom:link href="http://mobilepit.com/feed" rel="self" type="application/rss+xml" />
	<link>http://mobilepit.com</link>
	<description>Mobile Phone, PDA and JavaME (J2ME) Programming Blog</description>
	<lastBuildDate>Sat, 24 Oct 2009 19:09:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Another Attack hits Mobilepit.com</title>
		<link>http://mobilepit.com/10/another-attack-hits-mobilepit-com.html</link>
		<comments>http://mobilepit.com/10/another-attack-hits-mobilepit-com.html#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:09:48 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[outage]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spammers]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=168</guid>
		<description><![CDATA[Well seems Mobilepit.com has been subjected to yet another attack from spammers and has been unavailable for a duration of almost two weeks. This time the attackers injected the spam on each header of the Wordpress themes, and the payload was obfuscated using the base64 encoding. 
How does the attacker managed to inject those code [...]]]></description>
			<content:encoded><![CDATA[<p>Well seems Mobilepit.com has been subjected to yet another attack from spammers and has been unavailable for a duration of almost two weeks. This time the attackers injected the spam on each header of the Wordpress themes, and the payload was obfuscated using the base64 encoding. </p>
<p>How does the attacker managed to inject those code still baffles me, as I&#8217;ve already taken measures to remove write permission on every php files (and even directory!) on my account. Those with wordpress out there, better becareful as spams can crept into your blog without you realizing. So stay vigilant!</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/10/another-attack-hits-mobilepit-com.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobilepit has recovered from badware attacks!</title>
		<link>http://mobilepit.com/10/mobilepit-has-recovered-from-badware-attacks.html</link>
		<comments>http://mobilepit.com/10/mobilepit-has-recovered-from-badware-attacks.html#comments</comments>
		<pubDate>Sun, 04 Oct 2009 18:35:12 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[badware]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=166</guid>
		<description><![CDATA[Those who has been visiting this website for the last few days might notice that MobilePit has been subjected to injection attack. Causing it to distribute Badware unintentionally. This has triggered the Google Badware warning whenever somebody visited MobilePit website.
Rest assured, the injection attack has been fixed and this has been verified by the StopBadware.org [...]]]></description>
			<content:encoded><![CDATA[<p>Those who has been visiting this website for the last few days might notice that MobilePit has been subjected to injection attack. Causing it to distribute Badware unintentionally. This has triggered the Google Badware warning whenever somebody visited MobilePit website.</p>
<p>Rest assured, the injection attack has been fixed and this has been verified by the <a href="http://stopbadware.org/">StopBadware.org</a> to be free from malicious code. Additionally, the website has been secured to prevent similar future events from recurring. </p>
<p>Needless to say that, you should take care of your website security to prevent it from being compromised by spammers/crackers.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/10/mobilepit-has-recovered-from-badware-attacks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ClearContacts &#8211; Remove all contact list from your Windows Mobile Phone</title>
		<link>http://mobilepit.com/09/clearcontacts-remove-all-contact-list-from-your-windows-mobile-phone.html</link>
		<comments>http://mobilepit.com/09/clearcontacts-remove-all-contact-list-from-your-windows-mobile-phone.html#comments</comments>
		<pubDate>Wed, 09 Sep 2009 15:30:33 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Mobile Software]]></category>
		<category><![CDATA[PocketPC]]></category>
		<category><![CDATA[pocket pc]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=163</guid>
		<description><![CDATA[I&#8217;m sure at some point you may have come across this problem where you need to rid every contact information that are stored inside your Windows Mobile (Pocket PC) device. The problem is, Windows Mobile address book/contact list does not allow you to delete multiple contact at the same time. That would leave you with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure at some point you may have come across this problem where you need to rid every contact information that are stored inside your Windows Mobile (Pocket PC) device. The problem is, Windows Mobile address book/contact list does not allow you to delete multiple contact at the same time. That would leave you with only one choice, to delete the contact detail one by one, which is a hardly productive work for your time.</p>
<div align="center"><img src="http://drop.fakap.net/files/pocket-pc-pda.jpg" alt="Pocket PC generic" style="float:none;"/></div>
<p>Fortunately, there&#8217;s <a href="http://mypapit.net/drop/files/ClearContacts.exe">ClearContacts</a>, a small application that loop through your contact list and deletes contact information at the same time. This would eliminate the hassle that you&#8217;ve to go through when clearing your Pocket PC device from unwanted contact. Just copy/sync the ClearContacts into your device, and execute it. A dialog will appear to confirm your action, before all your contact list will be cleared.</p>
<p><a href="http://mypapit.net/drop/files/ClearContacts.exe">ClearContacts</a> requires Windows Mobile devices with at least Microsoft .Net Compact Framework 1.1 installed (don&#8217;t worry, most modern devices already have this.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/09/clearcontacts-remove-all-contact-list-from-your-windows-mobile-phone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a simple Click-A-Tell SendSMS HTTP POST API library</title>
		<link>http://mobilepit.com/09/a-simple-click-a-tell-sendsms-http-post-api-library.html</link>
		<comments>http://mobilepit.com/09/a-simple-click-a-tell-sendsms-http-post-api-library.html#comments</comments>
		<pubDate>Mon, 07 Sep 2009 14:01:45 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SMS and MMS]]></category>
		<category><![CDATA[Tips, Tricks, Guide]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[snippets]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=159</guid>
		<description><![CDATA[Click-a-tell is a simple web service that allows you to integrate sms sending capability into your web application. Its simplicity and wide range of API available is very attractive to small to medium web application developers. Among the API supported by Clickatell are :

HTTP POST
HTTP GET
FTP API
SOAP
EMAIL-to-SMS
COM Object

Clickatell website offers examples of how to use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://clickatell.com">Click-a-tell</a> is a simple web service that allows you to integrate sms sending capability into your web application. Its simplicity and wide range of API available is very attractive to small to medium web application developers. Among the API supported by Clickatell are :</p>
<ul>
<li>HTTP POST</li>
<li>HTTP GET</li>
<li>FTP API</li>
<li>SOAP</li>
<li>EMAIL-to-SMS</li>
<li>COM Object</li>
</ul>
<p>Clickatell website offers examples of how to use their API in several programming language including but not limited to : VB.net, PHP, ASP, ASP.NET,PERL, Python, Coldfusion, etc.</p>
<p>However I found that the example written for PHP is a little bit outdated and it uses the file() function to initiate HTTP GET request which is generally restricted on webservers as it pose a huge security risk. The other Clickatell class found through PHPClasses website are either too cumbersome for my project or supported other protocol than I intended to use.</p>
<p>As a result I wrote my own Clickatell SMS (<a href="http://drop.fakap.net/files/clickatell_sendsms_0.5.zip">clickatell_sendsms_0.5.zip</a>) class specifically for my own use. </p>
<p>Here are a sample code using the SendSMS 0.5 class</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SendSMS.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sendsms</span> = <span style="color:#000000; font-weight:bold;">new</span> SendSMS<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"username"</span>,<span style="color:#FF0000;">"password"</span>,<span style="color:#FF0000;">"HTTP POST API key"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/* if the login return 0, means that login failed, you cant send sms after this */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span>&nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span>&nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sendsms</span>-&gt;<span style="color:#006600;">login</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#CC66CC;color:#800000;">0</span>&nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/die"><span style="color:#000066;">die</span></a><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">"failed"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/*other wise, you can send sms using the simple send() call*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sendsms</span>-&gt;<span style="color:#006600;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"0132073011"</span>,<span style="color:#FF0000;">"testing send sms - camna? boleh dpt ? - mr hafiz"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You can download the <a href="http://drop.fakap.net/files/clickatell_sendsms_0.5.zip">clickatell_sendsms_0.5.zip">SendSMS 0.5 PHP class</a> from this website, note that the class is licensed under the terms of the GNU General Public License version 2, and the class is only meant to be use with Click-A-Tell HTTP POST API. </p>
<p>The class can also be use with the <a href="http://blog.mypapit.net/2006/02/libcurlemu-a-pure-php-curl-implementation-libcurl-emulator.html">libcurlemu library</a> whenever applicable.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/09/a-simple-click-a-tell-sendsms-http-post-api-library.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t SMS and Drive, it&#8217;s bad for your health</title>
		<link>http://mobilepit.com/09/dont-sms-and-drive-its-bad-for-your-health.html</link>
		<comments>http://mobilepit.com/09/dont-sms-and-drive-its-bad-for-your-health.html#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:18:56 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SMS and MMS]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[safety]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[texting]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=156</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<div align="center"><object width="460" height="279"><param name="movie" value="http://www.youtube.com/v/zFArUOaupp0&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zFArUOaupp0&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/09/dont-sms-and-drive-its-bad-for-your-health.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixed the annoying stale front page bug on MobilePit.com</title>
		<link>http://mobilepit.com/03/fixed-the-annoying-stale-front-page-bug-on-mobilepitcom.html</link>
		<comments>http://mobilepit.com/03/fixed-the-annoying-stale-front-page-bug-on-mobilepitcom.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 17:20:12 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cached]]></category>
		<category><![CDATA[mobilepit]]></category>
		<category><![CDATA[phones]]></category>
		<category><![CDATA[stale]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web page]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=154</guid>
		<description><![CDATA[I've finally have the time to fix the most annoying bug on this blog. This bug manifest itself as the Wordpress "page cache" bug, where new posts were not shown on the front page of this blog, which would give the impression that this blog was not updated for quite some time to visitors. 
The [...]]]></description>
			<content:encoded><![CDATA[<p>I've finally have the time to fix the most annoying bug on this blog. This bug manifest itself as the Wordpress "page cache" bug, where new posts were not shown on the front page of this blog, which would give the impression that this blog was not updated for quite some time to visitors. </p>
<p>The bug however does not affect the actual posts and web feeds, as the new posts can be accessed via their actual URL. The remedy of the problem (which i do) is to completely delete the current Wordpress installation (don't forget to backup "plugins" and "themes" directory) and replace it with a fresh installation, which a new "wp-config.php" will be created to point to the old database.</p>
<p>Reload the webpage, and your blog will be free from the "stale" front page bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/03/fixed-the-annoying-stale-front-page-bug-on-mobilepitcom.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phone ReUnion: A little bit of iPhone Joke</title>
		<link>http://mobilepit.com/03/phone-reunion-a-little-bit-of-iphone-joke.html</link>
		<comments>http://mobilepit.com/03/phone-reunion-a-little-bit-of-iphone-joke.html#comments</comments>
		<pubDate>Mon, 09 Mar 2009 04:50:53 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Smartphone]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[crackberry]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[reunion]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=150</guid>
		<description><![CDATA[
See more funny videos and funny pictures at CollegeHumor.
]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" data="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1899978&#038;fullscreen=1" width="460" height="276" ><param name="allowfullscreen" value="true"/><param name="wmode" value="transparent"/><param name="AllowScriptAccess" value="true"/><param name="movie" quality="best" value="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1899978&#038;fullscreen=1"/><embed src="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=1899978&#038;fullscreen=1" type="application/x-shockwave-flash" wmode="transparent"  width="460" height="276"  allowScriptAccess="always"></embed></object>
<div style="padding:5px 0; text-align:center; width:460px;">See more <a href="http://www.collegehumor.com/videos">funny videos</a> and <a href="http://www.collegehumor.com/pictures">funny pictures</a> at <a href="http://www.collegehumor.com/">CollegeHumor</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/03/phone-reunion-a-little-bit-of-iphone-joke.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Porting JavaME apps to Android is easier with J2ME Polish</title>
		<link>http://mobilepit.com/03/j2mepolish-makes-porting-javame-apps-to-android-easier.html</link>
		<comments>http://mobilepit.com/03/j2mepolish-makes-porting-javame-apps-to-android-easier.html#comments</comments>
		<pubDate>Tue, 03 Mar 2009 16:45:42 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Mobile Software]]></category>
		<category><![CDATA[gnugpl]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[j2mepolish]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[porting]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=146</guid>
		<description><![CDATA[Great news for JavaME developers! The J2ME Polish project has announced that their upcoming j2mepolish 2.1 toolkit suite will support porting JavaME apps to Google Android mobile platform automatically! This means that the current JavaME developers will enjoy the advantages of porting their existing mobile application to Android effortlessly.

According to their press release, the next [...]]]></description>
			<content:encoded><![CDATA[<p>Great news for JavaME developers! The J2ME Polish project has announced that their upcoming j2mepolish 2.1 toolkit suite will support porting<a href="http://java.sun.com/javame"> JavaME apps</a> to <a href="http://code.google.com/android/">Google Android </a>mobile platform automatically! This means that the current JavaME developers will enjoy the advantages of porting their existing mobile application to Android effortlessly.</p>
<div align="center"><img src="http://drop.fakap.net/files/android-logo.gif" alt="Android Logo" style="float:none;" /></div>
<p>According to <a href="http://www.j2mepolish.org/cms/fileadmin/press/PM_090212_MWC2.1._4_eng.pdf">their press release</a>, the next j2mepolish release will focus on automating the process of converting JavaME MIDlets to iPhone application. </p>
<p><strong>J2ME Polish 2.1:  Android support?</strong></p>
<div align="center"><img src="http://drop.fakap.net/files/j2mepolish_turtle.gif" alt="Android Logo" style="float:none;" /></div>
<p>Currently I've yet to see how a ported JavaME application would look like on an Android mobile phone, but hopefully it would be as good as the ordinary Google Android app. At this time of this writing, J2ME Polish 2.1 is only available as a preview release which can be downloaded from <a href="http://j2mepolish.org">J2ME Polish website</a>.</p>
<p>I'll update this blog about this feature once J2ME Polish 2.1 has been released. </p>
<p>p/s: I'm Eager to know how a JavaME app will look like once its ported to Android.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/03/j2mepolish-makes-porting-javame-apps-to-android-easier.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test post</title>
		<link>http://mobilepit.com/02/test-post.html</link>
		<comments>http://mobilepit.com/02/test-post.html#comments</comments>
		<pubDate>Tue, 24 Feb 2009 09:44:10 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mobilepit.com/02/test-post.html</guid>
		<description><![CDATA[This is a test post
]]></description>
			<content:encoded><![CDATA[<p>This is a test post</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/02/test-post.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaME JSR-179 Example Code : Detect Location via TinyGeocoder</title>
		<link>http://mobilepit.com/02/javame-jsr-179-example-code-detect-location-via-tinygeocoder.html</link>
		<comments>http://mobilepit.com/02/javame-jsr-179-example-code-detect-location-via-tinygeocoder.html#comments</comments>
		<pubDate>Sun, 22 Feb 2009 13:19:39 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Location API]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Smartphone]]></category>
		<category><![CDATA[Tips, Tricks, Guide]]></category>
		<category><![CDATA[coordinates]]></category>
		<category><![CDATA[e71]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[geocoder]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[jsr-179]]></category>
		<category><![CDATA[jsr179]]></category>
		<category><![CDATA[lbs]]></category>
		<category><![CDATA[location-api]]></category>
		<category><![CDATA[locationapi]]></category>
		<category><![CDATA[midlet]]></category>
		<category><![CDATA[midlets]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[tinygeocoder]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=142</guid>
		<description><![CDATA[I've completed the JSR-179 Location API code for reverse geocoding in JavaME. This code essentially is an expansion of the previous JSR-179 example that i've posted in the blog before, plus the Reverse-Geocoding feature, thanks to TinyGeocoder service.

What this sample MIDlet does? 
It obtain coordinates via the mobile phone JSR-179 Location API and subsequently display [...]]]></description>
			<content:encoded><![CDATA[<p>I've completed the JSR-179 Location API code for reverse geocoding in JavaME. This code essentially is an expansion of the previous JSR-179 example that i've posted in the blog before, plus the Reverse-Geocoding feature, thanks to <a href="http://mobilepit.com/02/tinygeo-coder-a-cool-free-geocodingreverse-geocoding-service.html">TinyGeocoder service</a>.</p>
<p><img src="http://drop.fakap.net/files/reverse_geocoding.png" alt="J2ME GPS Reverse Geocoding mypapit" style="float:none;" /></p>
<p><strong>What this sample MIDlet does? </strong><br />
It obtain coordinates via the mobile phone JSR-179 Location API and subsequently display the name of the location using <a href="http://mobilepit.com/02/tinygeo-coder-a-cool-free-geocodingreverse-geocoding-service.html">TinyGeocoder reverse geocoding</a> service.</p>
<div class="igBar"><span id="ljava-4"><a href="#" onclick="javascript:showPlainTxt('java-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-4">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.midlet.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.lcdui.*;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.location.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.io.*;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.location.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.io.*;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Geocoder <span style="color: #000000; font-weight: bold;">extends</span> MIDlet <span style="color: #000000; font-weight: bold;">implements</span> CommandListener</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Display display;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Form form;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> Command cmdExit,cmdOK;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> StringItem si, sili;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Geocoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; display =Display.<span style="color: #006600;">getDisplay</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form = <span style="color: #000000; font-weight: bold;">new</span> Form<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Location Api test"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; cmdExit = <span style="color: #000000; font-weight: bold;">new</span> Command<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Exit"</span>,Command.<span style="color: #006600;">EXIT</span>,<span style="color: #cc66cc;color:#800000;">5</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; cmdOK = <span style="color: #000000; font-weight: bold;">new</span> Command<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"OK"</span>,Command.<span style="color: #006600;">OK</span>,<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; si = <span style="color: #000000; font-weight: bold;">new</span> StringItem<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Coordinates"</span>, <span style="color: #ff0000;">"Press OK"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sili = <span style="color: #000000; font-weight: bold;">new</span> StringItem<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Location"</span>, <span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>si<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>sili<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form.<span style="color: #006600;">addCommand</span><span style="color: #66cc66;">&#40;</span>cmdOK<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form.<span style="color: #006600;">addCommand</span><span style="color: #66cc66;">&#40;</span>cmdExit<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; form.<span style="color: #006600;">setCommandListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> startApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; display.<span style="color: #006600;">setCurrent</span><span style="color: #66cc66;">&#40;</span>form<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> pauseApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> destroyApp<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">boolean</span> flag<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; notifyDestroyed<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> commandAction<span style="color: #66cc66;">&#40;</span>Command c, Displayable d<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>c == cmdOK<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Retriever ret = <span style="color: #000000; font-weight: bold;">new</span> Retriever<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ret.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>c == cmdExit<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destroyApp<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> displayString<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> string<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; si.<span style="color: #006600;">setText</span><span style="color: #66cc66;">&#40;</span>string<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> showAlert<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> message<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Alert alert = <span style="color: #000000; font-weight: bold;">new</span> Alert<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Alert"</span>,message,<span style="color: #000000; font-weight: bold;">null</span>,AlertType.<span style="color: #006600;">WARNING</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; display.<span style="color: #006600;">setCurrent</span><span style="color: #66cc66;">&#40;</span>alert,form<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span> Retriever <span style="color: #000000; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=allinurl%3AThread+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Thread</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> Geocoder midlet;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Form formRunning;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Gauge gauge;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Retriever<span style="color: #66cc66;">&#40;</span>Geocoder midlet<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;* Constructor</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;* EFFECTS: Initialise the server and store midlet information</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;* @param midlet The main application midlet</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;* @param server Forecast Server URL</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">midlet</span> = midlet;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; formRunning = <span style="color: #000000; font-weight: bold;">new</span> Form<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Retrieving Info"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; formRunning.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Gauge<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Processing"</span>,<span style="color: #000000; font-weight: bold;">false</span>,Gauge.<span style="color: #006600;">INDEFINITE</span>,Gauge.<span style="color: #006600;">CONTINUOUS_RUNNING</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">display</span>.<span style="color: #006600;">setCurrent</span><span style="color: #66cc66;">&#40;</span>formRunning<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> run<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * Entry point of the thread</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * EFFECTS: call to connect() method</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; checkLocation<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> ex<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ex.<span style="color: #006600;">printStackTrace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">displayString</span><span style="color: #66cc66;">&#40;</span>ex.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> checkLocation<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> string;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Location l;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; LocationProvider lp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Coordinates c;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Set criteria for selecting a location provider:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// accurate to 500 meters horizontally</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Criteria cr= <span style="color: #000000; font-weight: bold;">new</span> Criteria<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; cr.<span style="color: #006600;">setHorizontalAccuracy</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">5000</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; cr.<span style="color: #006600;">setVerticalAccuracy</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">5000</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Get an instance of the provider</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; lp= LocationProvider.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span>cr<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Request the location, setting a one-minute timeout</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; l = lp.<span style="color: #006600;">getLocation</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">120</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; c = l.<span style="color: #006600;">getQualifiedCoordinates</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>c != <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// Use coordinate information</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #993333;">double</span> lat = c.<span style="color: #006600;">getLatitude</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #993333;">double</span> lon = c.<span style="color: #006600;">getLongitude</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;string = <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>Latitude : "</span> + lat + <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>Longitude : "</span> + lon;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">new</span> GetData<span style="color: #66cc66;">&#40;</span>midlet,lat,lon<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string =<span style="color: #ff0000;">"Location API failed"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; formRunning.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Obtained coordinates..."</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">displayString</span><span style="color: #66cc66;">&#40;</span>string<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span> GetData <span style="color: #000000; font-weight: bold;">implements</span> <a href="http://www.google.com/search?q=allinurl%3ARunnable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Runnable</span></a>,CommandListener <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Geocoder midlet;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">double</span> lat, lon;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> GetData <span style="color: #66cc66;">&#40;</span>Geocoder midlet, <span style="color: #993333;">double</span> lat, <span style="color: #993333;">double</span> lon<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">lat</span> = lat;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">lon</span> = lon;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">midlet</span> = midlet;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> commandAction <span style="color: #66cc66;">&#40;</span>Command cmd,Displayable disp<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> start<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?q=allinurl%3AThread+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Thread</span></a> t = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AThread+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Thread</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;t.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> run<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; HttpConnection conn=<span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AInputStream+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">InputStream</span></a> is=<span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> sb;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> sUrl = <span style="color: #ff0000;">"http://tinygeocoder.com/create-api.php?g="</span>+<span style="color: #ff0000;">""</span>+lat+<span style="color: #ff0000;">","</span>+<span style="color: #ff0000;">""</span>+lon;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn = <span style="color: #66cc66;">&#40;</span>HttpConnection<span style="color: #66cc66;">&#41;</span> Connector.<span style="color: #006600;">open</span><span style="color: #66cc66;">&#40;</span>sUrl,Connector.<span style="color: #006600;">READ</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>conn.<span style="color: #006600;">getResponseCode</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == HttpConnection.<span style="color: #006600;">HTTP_OK</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is = conn.<span style="color: #006600;">openInputStream</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">byte</span> buf<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">byte</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">128</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> total =<span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>total &lt;<span style="color: #cc66cc;color:#800000;">128</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> count = is.<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span>buf,total,<span style="color: #cc66cc;color:#800000;">128</span>-total<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>count&lt;<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">break</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total += count;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sb = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#40;</span>buf,<span style="color: #cc66cc;color:#800000;">0</span>,total<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>sb.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> &lt;<span style="color: #cc66cc;color:#800000;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Connection error, please try again"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;midlet.<span style="color: #006600;">sili</span>.<span style="color: #006600;">setText</span><span style="color: #66cc66;">&#40;</span>sb<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//midlet.form.append(sb);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//vectorized();</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//midlet.saveCurrency(false,midlet.vector);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//midlet.display.setCurrent(midlet.form);</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>conn.<span style="color: #006600;">getResponseCode</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == HttpConnection.<span style="color: #006600;">HTTP_NOT_FOUND</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"URL not found"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Server busy or unavailable. Please try again later"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ASecurityException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">SecurityException</span></a> sex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Connection failed. You need to authorize this application to access network"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AIOException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">IOException</span></a> ioex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Connection failed. Please try again later."</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> e<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">showAlert</span><span style="color: #66cc66;">&#40;</span>e.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; e.<span style="color: #006600;">printStackTrace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//midlet.display.setCurrent(midlet.form);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>is != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>conn != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AIOException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">IOException</span></a> ioexception<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is =<span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn =<span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; midlet.<span style="color: #006600;">display</span>.<span style="color: #006600;">setCurrent</span><span style="color: #66cc66;">&#40;</span>midlet.<span style="color: #006600;">form</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> URLEncode<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> s<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>s!=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AStringBuffer+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> tmp = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AStringBuffer+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> i=<span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> b = <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span>s.<span style="color: #006600;">charAt</span><span style="color: #66cc66;">&#40;</span>i++<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>b&gt;=0x30 &amp;&amp; b&lt;=0x39<span style="color: #66cc66;">&#41;</span> || <span style="color: #66cc66;">&#40;</span>b&gt;=0x41 &amp;&amp; b&lt;=0x5A<span style="color: #66cc66;">&#41;</span> || <span style="color: #66cc66;">&#40;</span>b&gt;=0x61 &amp;&amp; b&lt;=0x7A<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmp.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>char<span style="color: #66cc66;">&#41;</span>b<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmp.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"%"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>b &lt;= 0xf<span style="color: #66cc66;">&#41;</span> tmp.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmp.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AInteger+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a>.<span style="color: #006600;">toHexString</span><span style="color: #66cc66;">&#40;</span>b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> e<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> tmp.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The code requires mobile device which implements  JSR-179 Location API and has been tested on Nokia E71 and 6210 Navigator.</p>
<ul>
<li><a href="http://drop.fakap.net/files/Geocoder.jar">Download Reverse Geocoding</a></li>
<li><a href="http://drop.fakap.net/files/mobile-geocoder-src.zip">Reverse Geocoding Sample Source Code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/02/javame-jsr-179-example-code-detect-location-via-tinygeocoder.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TinyGeo-coder : A cool free geocoding/reverse geocoding service</title>
		<link>http://mobilepit.com/02/tinygeo-coder-a-cool-free-geocodingreverse-geocoding-service.html</link>
		<comments>http://mobilepit.com/02/tinygeo-coder-a-cool-free-geocodingreverse-geocoding-service.html#comments</comments>
		<pubDate>Sun, 08 Feb 2009 17:25:06 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[Web Service]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[codes]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[geo coding]]></category>
		<category><![CDATA[geocoder]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[lbs]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[location-api]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=140</guid>
		<description><![CDATA[I was searching for a free and easy to use geocoding web service over the internet for my experiment involving Location Based Service (LBS). Then suddenly i came accross tinygeocoder, a web service which really suits my need. 
tinygeocoder services that caught my eye :

geocoding - you can feed it with name of place like [...]]]></description>
			<content:encoded><![CDATA[<p>I was searching for a free and easy to use geocoding web service over the internet for my experiment involving Location Based Service (LBS). Then suddenly i came accross <a href="http://tinygeocoder.com/">tinygeocoder</a>, a web service which really suits my need. </p>
<p><strong><a href="http://tinygeocoder.com/">tinygeocoder</a> services that caught my eye :</strong></p>
<ul>
<li>geocoding - you can feed it with name of place like "San Francisco, CA" and it will return result in latitude and longitude pair "(37.775196,-122.419204)"</li>
<li>reverse geocoding - feed it with a coordinate, and the service will return you the name of the corresponding place.</li>
</ul>
<p>Personally I like the "reverse geocoding" functionality more as it would be handy for my LBS project. Keep an eye for this blog as I'll be posting JavaME JSR-179 (Location API) codes which utilizes tinygeocoder services.</p>
<p>p/s: If you find <a href="http://tinygeocoder.com">tinygeoder</a> helpful, consider <a href="http://tinygeocoder.com/">making donations</a> to them.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/02/tinygeo-coder-a-cool-free-geocodingreverse-geocoding-service.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kirodict &#8211; a Compact, Lightweight JavaME mobile dictionary</title>
		<link>http://mobilepit.com/02/kirodict-a-lightweight-javame-mobile-dictionary.html</link>
		<comments>http://mobilepit.com/02/kirodict-a-lightweight-javame-mobile-dictionary.html#comments</comments>
		<pubDate>Sun, 08 Feb 2009 14:04:06 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mobile Software]]></category>
		<category><![CDATA[Motorola]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Sony Ericsson]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[compact]]></category>
		<category><![CDATA[dict]]></category>
		<category><![CDATA[dictionary]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[midlet]]></category>
		<category><![CDATA[midlets]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[rfc2229]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=137</guid>
		<description><![CDATA[Finally after spending a couple months working on this on and off personal project, I decided to release the final version of Kirodict - a lightweight mobile dictionary.
As it name implies, Kirodict was designed to be small in size while maintaining its functionality as a fully fledge dictionary for mobile and embedded device. Kirodict acts [...]]]></description>
			<content:encoded><![CDATA[<p>Finally after spending a couple months working on this on and off personal project, I decided to release the final version of Kirodict - a lightweight mobile dictionary.</p>
<p>As it name implies, Kirodict was designed to be small in size while maintaining its functionality as a fully fledge dictionary for mobile and embedded device. Kirodict acts as a front-end to an RFC2229 (dict.org) compatible server which it obtain the word definition from.</p>
<p><img src="http://drop.fakap.net/files/kirodict_nokia.png" alt="Kirodict - compact mobile dictionary" style="float:none;" /></p>
<p>Its small and compact size as well as its portability makes it an attractive application to be downloaded and installed on your mobile phone. Kirodict requires mobile phones with at least these feature :</p>
<ul>
<li>MIDP 2.0 /CLDC 1.0 compatible phones</li>
<li>128kB of free storage space</li>
<li>Phone with network connection (3G, GPRS, Wifi, wimax)</li>
</ul>
<p>With lower requirements, it can be installed on a lower end phone without much problem. Kirodict does not use additional storage space as it does not cache its results.</p>
<p>Kirodict can be downloaded from <a href="http://kirodict.googlecode.com/">Kirodict Google Code project</a> website and it is licensed under the GNU General Public License version 2.0</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/02/kirodict-a-lightweight-javame-mobile-dictionary.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Android Phone Kogan Agora delayed?</title>
		<link>http://mobilepit.com/02/google-android-phone-kogan-agora-delayed.html</link>
		<comments>http://mobilepit.com/02/google-android-phone-kogan-agora-delayed.html#comments</comments>
		<pubDate>Sun, 01 Feb 2009 10:52:15 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[android phone]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[kogan]]></category>
		<category><![CDATA[kogan agora]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[t-mobile]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=135</guid>
		<description><![CDATA[Probably a stale news for most of you, the touted second Google Android Phone on the market, Kogan Agora product has been canceled despite having received huge pre-orders. The official statement from Kogan Technologies website states that the Kogan Agora release is delayed indefinitely citing technical issues regarding is screen size and resolution.
Kogan Agora, estimated [...]]]></description>
			<content:encoded><![CDATA[<p>Probably a stale news for most of you, the touted second Google Android Phone on the market, <a href="http://en.wikipedia.org/wiki/Kogan_Agora">Kogan Agora</a> product has been canceled despite having received huge pre-orders. The official statement from <a href="http://kogan.com.au">Kogan Technologies</a> website states that the <a href="http://www.kogan.com.au/blog/2009/jan/16/kogan-agora-be-delayed/">Kogan Agora release is delayed indefinitely</a> citing technical issues regarding is screen size and resolution.</p>
<p>Kogan Agora, estimated to be available by Christmas 2008, might not even be ready by this year (2009). Customer who pre-ordered Kogan is being refunded as this article were written. </p>
<div align="center"><img src="http://drop.fakap.net/files/kogan_agora_fakaped.jpg" alt="Kogan Agora fakaped" style="float:none;"></div>
<p>Its a pity to see such affordable Google Android phone to be delayed indefinitely, while there are a lot of phone manufacturers behind <a href="http://en.wikipedia.org/wiki/Open_Handset_Alliance">Open Handset Alliance</a> (OHA, the organization that backed Android), we have yet to see other Google Android phone surfaces besides  HTC manufactured T-Mobile G1.</p>
<p>As for my personal opinion, I don't think Android platform is worth investing in right now since the only supported Android phone in the market is the SIM-locked T-Mobile, and although there has been news that <a href="http://www.betanews.com/article/Motorola_confirms_Android_plans_but_wont_say_how_big/1222789838">Motorola</a>, <a href="http://www.pcworld.com/businesscenter/article/153482/huawei_to_launch_android_and_symbian_smartphones_next_year.html">Huawei </a>and <a href="http://news.cnet.com/sony-ericsson-htc-planning-google-android-phones-for-2009/">Sony Ericsson</a> are preparing to release Android phone, I don't think I will give in much hope for Android until I've seen on the shelf of my local mobile phone store (SIM-unlocked, just like normal phones that is)</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/02/google-android-phone-kogan-agora-delayed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Primosync: Synchronize Google Calendar with Mobile Phone</title>
		<link>http://mobilepit.com/01/primosync-synchronize-google-calendar-with-mobile-phone.html</link>
		<comments>http://mobilepit.com/01/primosync-synchronize-google-calendar-with-mobile-phone.html#comments</comments>
		<pubDate>Sat, 31 Jan 2009 06:46:10 +0000</pubDate>
		<dc:creator>M.H Ismail</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Mobile Games]]></category>
		<category><![CDATA[Mobile Software]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[jsr-75]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile phone]]></category>
		<category><![CDATA[PDA]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=133</guid>
		<description><![CDATA[
This week, I've tried Primosync, a JavaME application which allows you to synchronize your Calendar, Events and activities with Google Calendar. 
Primosync is compatible with mobile phone which supports JavaME JSR-75 PIM API, a feature that becoming common in latest modern phones. 
Advantages of syncing phone calendar with Google Calendar :

You will be able to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://drop.fakap.net/files/google-calendar-logo.jpg" alt="Primosync Google Calendar" style="float:none;"/></p>
<p>This week, I've tried <a href="http://primosync.googlecode.com">Primosync</a>, a JavaME application which allows you to synchronize your Calendar, Events and activities with <a href="http://calendar.google.com">Google Calendar</a>. </p>
<p>Primosync is compatible with mobile phone which supports<a href="http://jcp.org/aboutJava/communityprocess/final/jsr075/"> JavaME JSR-75 PIM API</a>, a feature that becoming common in latest modern phones. </p>
<p>Advantages of syncing phone calendar with Google Calendar :</p>
<ul>
<li>You will be able to access your event, activities and reminders anywhere with internet connection</li>
<li>Your events and reminder will be more portable across various phone models as you can sync it with Google Calendar to update your Calendar</li>
<li>Easier to keep track of your reminder and events</li>
<li>As a backup measure in case if your mobile phone is stolen or lost</li>
</ul>
<p>You can download it from <a href="http://primosync.googlecode.com">Primosync Google Code </a>project website (yes it is open source!) or from <a href="http://primosync.mobi">Primosync.mobi download site</a> (mobile phone friendly). Available in 3 versions (Blackberry, JavaME Signed, JavaME Unsigned), for some reasons, I was unable to install the Signed version of Primosync in my E71. So I figure the Unsigned version might work in more phones.</p>
<p>So lets start syncing!</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/01/primosync-synchronize-google-calendar-with-mobile-phone.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>I bought a new phone &#8211; Nokia E71</title>
		<link>http://mobilepit.com/12/i-bought-a-new-phone-nokia-e71.html</link>
		<comments>http://mobilepit.com/12/i-bought-a-new-phone-nokia-e71.html#comments</comments>
		<pubDate>Thu, 25 Dec 2008 18:58:41 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Smartphone]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[jsr179]]></category>
		<category><![CDATA[location-api]]></category>
		<category><![CDATA[midp]]></category>
		<category><![CDATA[phone]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=130</guid>
		<description><![CDATA[I know I've been slacking lately on my post.. but hey, I got myself a new phone - The Nokia E71! 
Phones model and features are getting diverse now and I've noticed that its getting harder and harder to choose a phone that really suits my needs. For example, one feature found on Phone A [...]]]></description>
			<content:encoded><![CDATA[<p>I know I've been slacking lately on my post.. but hey, I got myself a new phone - The Nokia E71! </p>
<p>Phones model and features are getting diverse now and I've noticed that its getting harder and harder to choose a phone that really suits my needs. For example, one feature found on Phone A isnt necessarily can be found on Phone B.</p>
<p>So it took me a while to replace my good old 6630 that has been stolen few months before. But hey, I'm back on my feet now. </p>
<div align="center"><img src="http://fakap.net/drop/files/nokia-e71.jpg" alt="Nokia E71 papit" style="float:none;"/>
</div>
<p>Among the key feature that attract me to buy this phone are :</p>
<ul>
<li>Location API support (JSR-179) with built in GPS receiver</li>
<li>QWERTY keyboard</li>
<li>Ease of handling, my hands a bit slippy on its sister's phone E66</li>
<li>Battery last longer</li>
<li>Hot swappable micro-sd card</li>
<li>More than adequate internal memory</li>
<p>\</p>
<li>Supports WiFi</li>
</ul>
<p>The only drawback that I could think of this phone is its camera that is not as good as the N95,N96 series phone. But I can still live with that since I rarely use the camera anyway.</p>
<p><strong>Other additional feature</strong><br />
The phone comes with Advance Call Manager and Multi Scanner free of charge, making it easier to filter out unwanted call and to manage phone blacklist. </p>
<p>Multi Scanner allows you to take a photo of name card and automatically store important information (Name, Phone Number, Address, Company's Name, Fax Number) right into the phone. </p>
<p>I hope I can be more productive at updating this blog and producing new mobile applications with this phone.</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/12/i-bought-a-new-phone-nokia-e71.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to get Nokia Battery Level in JavaME</title>
		<link>http://mobilepit.com/11/how-to-get-nokia-battery-level-in-javame.html</link>
		<comments>http://mobilepit.com/11/how-to-get-nokia-battery-level-in-javame.html#comments</comments>
		<pubDate>Sun, 09 Nov 2008 00:17:49 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Tips, Tricks, Guide]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[mboilepit]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Symbian]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=123</guid>
		<description><![CDATA[Nokia Symbian 3rd Edition phone introduces "com.nokia.mid.batterylevel" properties which you can get the current battery charge level by calling System.getProperty("com.nokia.mid.batterylevel") from within your midlet application. Its up to your imagination for you to do the rest.
Sample source code (displaying battery charge level on gauge):
PLAIN TEXT
JAVA:




/**********


/*


/* Nokia Battery Level midlet


/* Copyright 2008 Mohammad Hafiz bin Ismail [...]]]></description>
			<content:encoded><![CDATA[<p>Nokia Symbian 3rd Edition phone introduces "com.nokia.mid.batterylevel" properties which you can get the current battery charge level by calling System.getProperty("com.nokia.mid.batterylevel") from within your midlet application. Its up to your imagination for you to do the rest.</p>
<p>Sample source code (displaying battery charge level on gauge):</p>
<div class="igBar"><span id="ljava-6"><a href="#" onclick="javascript:showPlainTxt('java-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-6">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**********</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* Nokia Battery Level midlet</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* Copyright 2008 Mohammad Hafiz bin Ismail (info@mypapit.net)</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* http://mobilepit.com</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* May be use freely</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">**********/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.midlet.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.microedition.lcdui.*;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NokiaBattery <span style="color: #000000; font-weight: bold;">extends</span> MIDlet <span style="color: #000000; font-weight: bold;">implements</span> CommandListener <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">int</span> value;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Display display;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Form form;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Gauge gauge;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Command cmdExit;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> NokiaBattery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;display = Display.<span style="color: #006600;">getDisplay</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;form = <span style="color: #000000; font-weight: bold;">new</span> Form<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Nokia Battery"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;cmdExit = <span style="color: #000000; font-weight: bold;">new</span> Command<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Exit"</span>,Command.<span style="color: #006600;">EXIT</span>,<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;form.<span style="color: #006600;">addCommand</span><span style="color: #66cc66;">&#40;</span>cmdExit<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;value=<a href="http://www.google.com/search?q=allinurl%3AInteger+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a>.<span style="color: #006600;">parseInt</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.nokia.mid.batterylevel"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;gauge = <span style="color: #000000; font-weight: bold;">new</span> Gauge<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Level"</span>,<span style="color: #000000; font-weight: bold;">false</span>,<span style="color: #cc66cc;color:#800000;">100</span>,value<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;form.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>gauge<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">form.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Value :"</span>+value<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;StringItem item = <span style="color: #000000; font-weight: bold;">new</span> StringItem<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Network Signal"</span>,<a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.nokia.mid.networksignal"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;form.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>item<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;form.<span style="color: #006600;">setCommandListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> startApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; display.<span style="color: #006600;">setCurrent</span><span style="color: #66cc66;">&#40;</span>form<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> pauseApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> destroyApp<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">boolean</span> flags<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; notifyDestroyed<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> commandAction <span style="color: #66cc66;">&#40;</span>Command cmd, Displayable disp<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>cmd == cmdExit<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;destroyApp<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Download source code and sample midlet : <a href="http://mobilepit.com/dld/files/NokiaBattery_midlet.zip">NokiaBattery_midlet.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/11/how-to-get-nokia-battery-level-in-javame.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free Skype JavaME (J2ME) client for mobile device</title>
		<link>http://mobilepit.com/06/free-skype-javame-j2me-client-for-mobile-device.html</link>
		<comments>http://mobilepit.com/06/free-skype-javame-j2me-client-for-mobile-device.html#comments</comments>
		<pubDate>Thu, 26 Jun 2008 16:01:47 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Mobile Software]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[javame]]></category>
		<category><![CDATA[messenger]]></category>
		<category><![CDATA[midp]]></category>
		<category><![CDATA[midp 2.0]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile app]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=122</guid>
		<description><![CDATA[Great news for those who are using Skype to get connected with their contacts, now they can  do so while on the move with the free Skype mobile client. 
The mobile client offers chat feature as well as receiving calls from Skype contacts. However  airtime charge may incur for receiving voice call, depending [...]]]></description>
			<content:encoded><![CDATA[<p>Great news for those who are using Skype to get connected with their contacts, now they can  do so while on the move with the free Skype mobile client. </p>
<p>The mobile client offers chat feature as well as receiving calls from Skype contacts. However  airtime charge may incur for receiving voice call, depending on the subscribers' data plan.  </p>
<p><img src="http://fakap.net/drop/files/skypemobile.gif" alt="" style="float:none;" /></p>
<p>The main advantage of this J2ME client is portability across a wide-range of mobile devices which implements MIDP 2.0. Although the Skype Mobile website lists only handful of supported device, in reality Mobile Skype is supported on a lot more devices.</p>
<p>Disadvantages include its inability to send SMS to your contacts and the inability to make voice calls. However in my opinion, the free Mobile Skype does its best considering it is written for mobile devices with limited capabilities.</p>
<p>You can download Skype Mobile from this website : <a href="http://mobiledownload.skype.com/">http://mobiledownload.skype.com/</a></p>
<p><strong>Tips</strong><br />
With  little creativity on java jad file, you can install Mobile Skype on any MIDP 2.0 supported device without much trouble</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/06/free-skype-javame-j2me-client-for-mobile-device.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Upgraded to Wordpress 2.5.1</title>
		<link>http://mobilepit.com/05/upgraded-to-wordpress-251.html</link>
		<comments>http://mobilepit.com/05/upgraded-to-wordpress-251.html#comments</comments>
		<pubDate>Mon, 19 May 2008 06:12:17 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://mobilepit.com/?p=121</guid>
		<description><![CDATA[This website upgraded has been upgraded to wordpress 2.5.1 to ensure quality content delivery for its reader. Thank you for subscribing and reading this blog after this long years. I'm planning to continue to write in the blog again some time after next month. 
So stay tuned!
]]></description>
			<content:encoded><![CDATA[<p>This website upgraded has been upgraded to wordpress 2.5.1 to ensure quality content delivery for its reader. Thank you for subscribing and reading this blog after this long years. I'm planning to continue to write in the blog again some time after next month. </p>
<p>So stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/05/upgraded-to-wordpress-251.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create PC Bluetooth application easily with pybluez</title>
		<link>http://mobilepit.com/10/create-pc-bluetooth-application-easily-with-pybluez.html</link>
		<comments>http://mobilepit.com/10/create-pc-bluetooth-application-easily-with-pybluez.html#comments</comments>
		<pubDate>Tue, 23 Oct 2007 04:19:46 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PDA]]></category>
		<category><![CDATA[PocketPC]]></category>
		<category><![CDATA[Tips, Tricks, Guide]]></category>

		<guid isPermaLink="false">http://mobilepit.com/10/create-pc-bluetooth-application-easily-with-pybluez.html</guid>
		<description><![CDATA[pybluez is a python bindings for the bluez application which enables you to interface with bluetooth devices on your computer.
Combined with the power of python dynamic typing, you will be able to do Rapid Application Development and test mobile bluetooth application quickly on your computer
Here's a snippets which combines pyosd and pybluez which scans for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://people.csail.mit.edu/albert/bluez-intro/index.html">pybluez</a> is a python bindings for the bluez application which enables you to interface with bluetooth devices on your computer.</p>
<p>Combined with the power of python dynamic typing, you will be able to do Rapid Application Development and test mobile bluetooth application quickly on your computer</p>
<p>Here's a snippets which combines pyosd and pybluez which scans for nearby bluetooth devices and display the result on screen :</p>
<div class="igBar"><span id="lpython-8"><a href="#" onclick="javascript:showPlainTxt('python-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PYTHON:</span>
<div id="python-8">
<div class="python">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">import</span> bluetooth</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">import</span> pyosd</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">time</span> <span style="color: #ff7700;font-weight:bold;">import</span> sleep</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p = pyosd.<span style="color: black;">osd</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color: black;">set_pos</span><span style="color: black;">&#40;</span>pyosd.<span style="color: black;">POS_MID</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color: black;">set_align</span><span style="color: black;">&#40;</span>pyosd.<span style="color: black;">ALIGN_CENTER</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color: black;">set_colour</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">"green"</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color: black;">display</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">"Scanning for bluetooth device"</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">nearby_devices = bluetooth.<span style="color: black;">discover_devices</span><span style="color: black;">&#40;</span>duration=<span style="color: #ff4500;color:#800000;">20</span>, lookup_names = <span style="color: #008000;">True</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #008000;">str</span>= <span style="color: #483d8b;">"found %d devices"</span> % <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>nearby_devices<span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">str</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p.<span style="color: black;">display</span><span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sleep<span style="color: black;">&#40;</span><span style="color: #ff4500;color:#800000;">2</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff7700;font-weight:bold;">for</span> name, addr <span style="color: #ff7700;font-weight:bold;">in</span> nearby_devices:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;p.<span style="color: black;">display</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">"&nbsp; %s - %s"</span> % <span style="color: black;">&#40;</span>addr, name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">" %s - %s"</span> % <span style="color: black;">&#40;</span>addr,name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;sleep<span style="color: black;">&#40;</span><span style="color: #ff4500;color:#800000;">2</span><span style="color: black;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Python enables Rapid Application Development on  your computer without much fuss.  Coupled with <a href="http://pygtk.org/tutorial.html">pygtk</a> and <a href="http://www.wxpython.org/">wxPython</a> acting as GUI, you can create a lot of bluetooth application to interface with your mobile devices, limited only by your imagination.</p>
<p>[tags]python,pybluez,bluetooth,gtk,gnome,linux,mobile,pda,programming,development,RAD[/tags]</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/10/create-pc-bluetooth-application-easily-with-pybluez.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get Phone IMEI number with J2ME / JavaME</title>
		<link>http://mobilepit.com/10/how-to-get-imei-number-in-j2me-javame.html</link>
		<comments>http://mobilepit.com/10/how-to-get-imei-number-in-j2me-javame.html#comments</comments>
		<pubDate>Fri, 12 Oct 2007 11:57:53 +0000</pubDate>
		<dc:creator>mypapit</dc:creator>
				<category><![CDATA[J2ME / JavaME]]></category>
		<category><![CDATA[Motorola]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Samsung]]></category>
		<category><![CDATA[Sony Ericsson]]></category>

		<guid isPermaLink="false">http://mobilepit.com/10/how-to-get-imei-number-in-j2me-javame.html</guid>
		<description><![CDATA[International Mobile Equipment Identity (IMEI)  is used to identify valid devices connected to GSM and UMTS network. This number can be accessed from a mobile phone by dialing *#06# on the keypad. IMEI is commonly use by software developers as part of software protection scheme to prevent it from being pirated.
JavaME developers however suffers [...]]]></description>
			<content:encoded><![CDATA[<p>International Mobile Equipment Identity (IMEI)  is used to identify valid devices connected to GSM and UMTS network. This number can be accessed from a mobile phone by dialing *#06# on the keypad. IMEI is commonly use by software developers as part of software protection scheme to prevent it from being pirated.</p>
<p>JavaME developers however suffers from a drawback because MIDP/CLDC specification does not include an API to obtain IMEI from mobile devices. However there are few phone manufacturers included this functionality through <em>System.getPropery()</em> calls. </p>
<p>Here's how to get IMEI number from mobile devices of different manufacturers<br />
<strong>Nokia</strong></p>
<div class="igBar"><span id="ljava-14"><a href="#" onclick="javascript:showPlainTxt('java-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-14">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"phone.imei"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.nokia.IMEI"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Note ; Requires signed midlet. S60 3rd edition device does not requires signing for this to work.</p>
<p><strong>Sony-Ericsson</strong></p>
<div class="igBar"><span id="ljava-15"><a href="#" onclick="javascript:showPlainTxt('java-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-15">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.sonyericsson.imei"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Note ; might not work on all model, YMMV</p>
<p><strong>Motorola</strong></p>
<div class="igBar"><span id="ljava-16"><a href="#" onclick="javascript:showPlainTxt('java-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-16">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"IMEI"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.motorola.IMEI"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Samsung</strong></p>
<div class="igBar"><span id="ljava-17"><a href="#" onclick="javascript:showPlainTxt('java-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-17">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.samsung.imei"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><string>Siemens</strong></p>
<div class="igBar"><span id="ljava-18"><a href="#" onclick="javascript:showPlainTxt('java-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-18">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"com.siemens.imei"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Hopefully this information can aid you in your J2ME programming projects.</p>
<p><strong>Quick Tip :</strong><br />
It's quite hard to determine the phone model/manufacturer well ahead beforehand. For a more robust solution, I suggest that you combine the above call with System.getProperty("microedition.platform").</p>
<p>[tags]j2me,javame,mobile,opensource,imei,nokia,sony ericsson,samsung,motorola[/tags]</p>
]]></content:encoded>
			<wfw:commentRss>http://mobilepit.com/10/how-to-get-imei-number-in-j2me-javame.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.402 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-12 19:42:48 -->
