<?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>programming with passion &#187; Mobile Devices</title>
	<atom:link href="http://www.jasonrowland.com/category/mobile-devices/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonrowland.com</link>
	<description>Learning Mac, Ruby, iPhone, BlackBerry, Android, WinMobile</description>
	<lastBuildDate>Tue, 14 Jun 2011 19:11:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Background Applications on the BlackBerry</title>
		<link>http://www.jasonrowland.com/2010/07/background-applications-on-the-blackberry/</link>
		<comments>http://www.jasonrowland.com/2010/07/background-applications-on-the-blackberry/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:29:19 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Mobile Devices]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=160</guid>
		<description><![CDATA[Useful articles about background applications on the blackberry. http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800738/800901/How_To_-_Setup_an_alternate_entry_point_for_my_application.html?nodeid=800820 http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800639/How_to_-_Make_a_running_UI_application_go_to_the_background_and_resume_in_the_foreground.html?nodeid=800545&#038;vernum=0 http://docs.blackberry.com/en/developers/deliverables/6625/Dimensions_for_screens_images_and_icons_476251_11.jsp http://rim.lithium.com/rim/board/message?board.id=java_dev&#038;message.id=2519 http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&#038;message.id=392]]></description>
			<content:encoded><![CDATA[<p>Useful articles about background applications on the blackberry.</p>
<p>http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800738/800901/How_To_-_Setup_an_alternate_entry_point_for_my_application.html?nodeid=800820</p>
<p>http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800639/How_to_-_Make_a_running_UI_application_go_to_the_background_and_resume_in_the_foreground.html?nodeid=800545&#038;vernum=0</p>
<p>http://docs.blackberry.com/en/developers/deliverables/6625/Dimensions_for_screens_images_and_icons_476251_11.jsp</p>
<p>http://rim.lithium.com/rim/board/message?board.id=java_dev&#038;message.id=2519</p>
<p>http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&#038;message.id=392</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/07/background-applications-on-the-blackberry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blackberry JME has very limited threads</title>
		<link>http://www.jasonrowland.com/2010/07/blackberry-jme-has-very-limited-threads/</link>
		<comments>http://www.jasonrowland.com/2010/07/blackberry-jme-has-very-limited-threads/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:27:14 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Mobile Devices]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=303</guid>
		<description><![CDATA[I had written a CRON scheduler for the blackberry for one of my clients.  This CRON scheduler was failing seemingly randomly where the thread that checks the schedules would just die.  In order to make sure a task is launched exactly when it should, I would spin off a thread and execute that code.  You [...]]]></description>
			<content:encoded><![CDATA[<p>I had written a CRON scheduler for the blackberry for one of my clients.  This CRON scheduler was failing seemingly randomly where the thread that checks the schedules would just die.  In order to make sure a task is launched exactly when it should, I would spin off a thread and execute that code.  You can see where this is going right?  It worked just fine under my development tests.  When it went to QA, it would fail.  After tracing it down, it was failing on the line:</p>
<p>thread.start();</p>
<p>After finding the exact line of code where it was crashing, I surrounded this line of code with a try/catch on Throwable with this code:</p>
<p>System.out.println(&#8220;Error: &#8221; + exc.getClass().toString() + &#8221; = &#8221; + exc.getMessage());</p>
<p>The output from this was:</p>
<p>Error: class net.rim.vm.TooManyThreadsError = null</p>
<p>Which of course led me to my problem.  Now there is no mention of a limitation in the <a title="Blackberry Documentation" href="http://www.blackberry.com/developers/docs/4.3.0api/java/lang/Thread.html">Blackberry documentation</a> telling me how many threads I can have.  In hind sight, I should have know given that even in desktop apps you should use threads sparingly.  These threads I created were supposed to be very short lived.  They spin up, do their action and then go away.  In my testing that&#8217;s exactly what was happening but I wasn&#8217;t stressing the system with lots of tasks.  Consequently under real-world use, trying to start that last thread was killing the thread that created it.</p>
<p>I can&#8217;t simply use the ThreadPool class provided in java.util.concurrent because that is not available in J2ME/JME.  I just created my own based on an <a href="http://www.ibm.com/developerworks/library/j-jtp0730.html">article written by IBM about Thread pools and work queues</a>.  I had to use Vector instead of a linked list (didn&#8217;t feel like writing my own but I should because removing an element from a vector is expensive and I have to do it every time I pop an element out).  Worked like a champ!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/07/blackberry-jme-has-very-limited-threads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone web caching sqlite3</title>
		<link>http://www.jasonrowland.com/2010/03/iphone-web-caching-sqlite3/</link>
		<comments>http://www.jasonrowland.com/2010/03/iphone-web-caching-sqlite3/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:00:37 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=301</guid>
		<description><![CDATA[If you are using the iPhone simulator to test your web application, you can query sqlite3 cache tables by going to the following directory: ~/Library/Application Support/iPhone Simulator/User/Library/Caches/com.apple.WebAppCache Command to open the cache database: sqlite3 ApplicationCache.db Once inside, you can use the following command to view the tables: sqlite&#62; .tables This is very helpful in troubleshooting [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the iPhone simulator to test your web application, you can query sqlite3 cache tables by going to the following directory:</p>
<pre>~/Library/Application Support/iPhone Simulator/User/Library/Caches/com.apple.WebAppCache</pre>
<p>Command to open the cache database:</p>
<pre>sqlite3 ApplicationCache.db</pre>
<p>Once inside, you can use the following command to view the tables:</p>
<pre>sqlite&gt; .tables</pre>
<p>This is very helpful in troubleshooting caching issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/03/iphone-web-caching-sqlite3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UPDATE: Windows Mobile 6 Smart Phone Signed Cab displaying “Program is from an unknown publisher”</title>
		<link>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/</link>
		<comments>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:37:22 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=295</guid>
		<description><![CDATA[Previously, I wrote about signing cab files for Windows Mobile 6.  The application was initially created for Windows Mobile 5 Pocket PC devices.  We got it working on Windows Mobile 6 Pocket PC. Recently, I was tasked with creating an installer application to get around some of the browser inconsistencies they&#8217;ve been experiencing with the [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, I wrote about <a href="http://www.jasonrowland.com/2009/08/windows-mobile-6-signed-cab-displaying-program-is-from-an-unknown-publisher/">signing cab files for Windows Mobile 6</a>.  The application was initially created for Windows Mobile 5 Pocket PC devices.  We got it working on Windows Mobile 6 Pocket PC.</p>
<p>Recently, I was tasked with creating an installer application to get around some of the browser inconsistencies they&#8217;ve been experiencing with the various Smart Phones.  They have an installer app that has an executable and an XML file that the executable reads for it&#8217;s configuration.  Pocket PC allows you to download the XML file and the executable file and everything just worked.  The Smart Phones do not behave this way.  I created an app that downloads both the EXE and the XML file to the My Documents directory and launches the EXE.  Works great.</p>
<p>My problems started when I tried to cab up the whole thing and install it from a mobile device.  I signed each file inside the cab as well as the cab itself.  I kept getting prompted by the device asking me if I want to trust this unknown publisher?  At first, I thought maybe I had screwed up the signing.  Turns out that no, I did sign it correctly&#8230; for windows clients.  The Windows Mobile platform uses a different technology than Authenticode.</p>
<p>On this MSDN article about how to <a href="http://msdn.microsoft.com/en-us/dd569931.aspx">Sign your Windows Mobile Application</a>, it states very clearly: &#8221;Authenticode signatures for other Windows platforms, such as Windows Client or Windows Server, use a different technology than Windows Mobile code signing and are not recognized as valid normal or privileged mode signatures.&#8221;  What I don&#8217;t yet understand is that it states Windows Mobile (not Smart Phone) uses a different technology, yet we used Authenticode to make the prompts go away for the Pocket PCs we were testing on (Windows Mobile 5 and 6).</p>
<p>The Windows Mobile code signing seems very expensive.  From what I can tell it costs $350 for 10 signings.  There is an additional fee for each signing after that.  What this means is that you better be darn sure your application is finished before signing your application.  I&#8217;ve read that you have to submit your signed cab to Verisign who then signs your cab file with their certificate.  I am beginning to hate the Windows Mobile platform and might actively root for their demise&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/03/update-windows-mobile-6-smart-phone-signed-cab-displaying-%e2%80%9cprogram-is-from-an-unknown-publisher%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone web apps</title>
		<link>http://www.jasonrowland.com/2010/02/iphone-web-apps/</link>
		<comments>http://www.jasonrowland.com/2010/02/iphone-web-apps/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 07:04:19 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=270</guid>
		<description><![CDATA[The iPhone has some really cool features for web apps. One feature that I particularly like is called Web Clips.  These are pages that can be installed on your home screen.  You can specify an icon for use on the home page just like you would for a native app.  If you don&#8217;t supply one, [...]]]></description>
			<content:encoded><![CDATA[<p>The iPhone has some really cool features for web apps.</p>
<p>One feature that I particularly like is called Web Clips.  These are pages that can be installed on your home screen.  You can specify an icon for use on the home page just like you would for a native app.  If you don&#8217;t supply one, then it uses a screen capture of your page.  You can also supply a splash screen png that will display while your web page is loading.  You can hide the address bar to make it look even more like a native app.  There is one small gotcha with this though.  If you click on any link inside your webpage, it will open up Safari and close your nice page.  The trick then is to make the entire application a one page app.  You accomplish this through the use of AJAX.</p>
<p>Another feature that is very cool is new to HTML 5.  You can specify a cache manifest file that tells the iPhone which files to cache locally.  The cool thing about this is that if you have an application that is static, you can run the app while the iPhone is in airplane mode.  This is very cool.  You can even specify fallback files that are used when the app is offline.  When I tested this out, the application was VERY snappy.  Currently only Firefox 3 and Safari 4 support this.</p>
<p>A final feature that I have not explored very much is client side storage.  This is also a new HTML 5 feature.  All the newest browsers except Chrome support this feature.  This is a necessary feature if you want to have some sort of database driven offline capable application for the mobile device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/02/iphone-web-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controls for Windows Mobile Smart Phones</title>
		<link>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/</link>
		<comments>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:56:15 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=265</guid>
		<description><![CDATA[I ran into Smart Phone not supporting another control.  It doesn&#8217;t support button controls.  The Smart Phone has a menu at the bottom that behaves as a button. I seem to have troubles finding this article when I need it, so here is a link to help me figure out the user interface options I [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into Smart Phone not supporting another control.  It doesn&#8217;t support button controls.  The Smart Phone has a menu at the bottom that behaves as a button.</p>
<p>I seem to have troubles finding this article when I need it, so here is a link to help me figure out the user interface options I have for the SmartPhone:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa446513.aspx#smartphoneuserinterface_topic3">http://msdn.microsoft.com/en-us/library/aa446513.aspx#smartphoneuserinterface_topic3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/02/controls-for-windows-mobile-smart-phones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile Smartphone vs Pocket PC</title>
		<link>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/</link>
		<comments>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 03:10:53 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Mobile Devices]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=169</guid>
		<description><![CDATA[I recently encountered an issue where a Windows Mobile 5 application I wrote wasn&#8217;t working on a Windows Mobile 6 smart phone.  This particular phone was in Spain so I was not able to hold it in my hands. Initially I believed it was because I didn&#8217;t have the Windows Mobile 6 SDK installed.  I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently encountered an issue where a Windows Mobile 5 application I wrote wasn&#8217;t working on a Windows Mobile 6 smart phone.  This particular phone was in Spain so I was not able to hold it in my hands.</p>
<p>Initially I believed it was because I didn&#8217;t have the Windows Mobile 6 SDK installed.  I needed the app to be backward compatible to Windows Mobile 5 so I haven&#8217;t messed around with the new SDK yet.  When I looked (skimmed) through the documentation, everything led me to believe that most windows mobile 5 apps will run on a Windows Mobile 6 device.  There is the exception that if you are using undocumented APIs, they aren&#8217;t guaranteed to work.  Since the app I&#8217;m working on logs GPS coordinates in the background, it was possible that I was using some calls through a 3rd party library.</p>
<p>Turns out my problem was much more basic.  Once I got my hands on an actual Windows Mobile 5 smart device to test on, I discovered the problem right away.  The app was failing when it tried to create a list box.  My simplistic thinking was that you write applications for &#8220;Windows Mobile 5&#8243;.  You actually write for either Windows Mobile Smartphones or Windows Mobile Pocket PCs.  One is more limited than the other.  The naming is still confusing to me.  My iPhone is a &#8220;smart phone&#8221; so I assumed that Smartphone was simply Pocket PC + phone.  WRONG.  Windows Mobile 6 makes it even worse.  They label one sdk &#8220;standard&#8221; and the other &#8220;professional&#8221;.  I am pretty sure professional = pocket pc = more functionality.</p>
<p>So I learned that if you want to write lowest common denominator applications for Windows Mobile, you need to target the smart phone.  And you should really test your interface at different resolutions because those smart phones have tiny screens.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/12/windows-mobile-smartphone-vs-pocket-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java ME Date add functionality</title>
		<link>http://www.jasonrowland.com/2009/11/java-me-date-add-functionality/</link>
		<comments>http://www.jasonrowland.com/2009/11/java-me-date-add-functionality/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 18:24:40 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[BlackBerry]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=165</guid>
		<description><![CDATA[Programming for the blackberry can be frustrating.  It seems that they have taken every useful function I&#8217;ve used in the past and thought &#8220;is there a harder way to do this already?&#8221;  If the answer was yes, they ripped out the function.  The latest example I&#8217;ve uncovered while developing is simply adding time and dates [...]]]></description>
			<content:encoded><![CDATA[<p>Programming for the blackberry can be frustrating.  It seems that they have taken every useful function I&#8217;ve used in the past and thought &#8220;is there a harder way to do this already?&#8221;  If the answer was yes, they ripped out the function.  The latest example I&#8217;ve uncovered while developing is simply adding time and dates to arrive at some time in the future.  I am trying to add a number of seconds to an existing timestamp.  In standard Java, there is a handy add function that does this for you.  Unfortunately, in Java ME, they have ripped it out.  To get that functionality back, you need to understand when you call getTime() on a date, it returns the number of milliseconds since January 1, 1970, 00:00:00 GMT as a long. The value &#8220;1&#8243; represents one millisecond.  So, to add one day to your date, you simply need to determine how many milliseconds in one day and add that to the value returned by getTime().</p>
<pre>int milliseconds = 1 * 1000 * 60 * 60 * 24;  // 1 day * 1000 milliseconds/second * 60 seconds/minute * 60 minutes/hour * 24 hours/day
Date newDate = new Date(myDate.getTime() + milliseconds);</pre>
<p>This will add one day to your date.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/11/java-me-date-add-functionality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making an HTTP Request on BlackBerry</title>
		<link>http://www.jasonrowland.com/2009/10/making-an-http-request-on-blackberry/</link>
		<comments>http://www.jasonrowland.com/2009/10/making-an-http-request-on-blackberry/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:28:47 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[BlackBerry]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=152</guid>
		<description><![CDATA[Seems like it is rather complex to make a simple HTTP request on BlackBerry.  The code for opening a connection is straightforward: String url = "http://10.0.0.1"; HttpConnection conn = conn = (HttpConnection)Connector.open(url); The complexity comes in because I am developing on a  BlackBerry device without service.  When I try to execute the above code, I [...]]]></description>
			<content:encoded><![CDATA[<p>Seems like it is rather complex to <a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is_-_Different_ways_to_make_an_HTTP_or_socket_connection.html?nodeid=826935&amp;vernum=0">make a simple HTTP request on BlackBerry</a>.  The code for opening a connection is straightforward:</p>
<pre>String url = "http://10.0.0.1";
HttpConnection conn = conn = (HttpConnection)Connector.open(url);</pre>
<p>The complexity comes in because I am developing on a  BlackBerry device without service.  When I try to execute the above code, I get an IOException stating &#8220;Tunnel failed&#8221;.  From searching, it appears that I get this message because APN is not set.  I can not set it because I do not have service for this phone.  If you don&#8217;t have the APN set, it does not automatically try and use the WIFI connection.  Apparently there are six different methods for using a connection.  Each one of these requires a different string appended to the URL to determine which one gets used.</p>
<h2>BlackBerry MDS</h2>
<p>The first method is using BlackBerry MDS.  This forces all traffic to go through the BlackBerry enterprise server.  It encrypts all traffic using AES or Triple DES.  My task is to specifically avoid using the MDS because we are creating a cloud service where the customer does not need to have any server let alone a BlackBerry enterprise server.</p>
<pre>String url = "http://10.0.0.1;deviceside=false";</pre>
<h2>BlackBerry Internet Service</h2>
<p>The second method is to use the BlackBerry Internet Service.  This is only available to approved <a href="http://na.blackberry.com/eng/partners/Brochure_Leads.pdf">BlackBerry Alliance Program</a> members.  There are different tiers. The public tier which is free does not offer the BlackBerry Internet service feature.  The minimum tier that supports this is the BlackBerry Alliance Associate Member which costs $2,000/yr and requires 45 member points.  To get this, you basically have to make losts of money using the BlackBerry platform or promot it in other ways.  You can look at <a href="http://na.blackberry.com/eng/partners/FAQ_Leads.pdf">their FAQ</a> for more details, but basically we don&#8217;t have this option available to me right now.</p>
<h2>TCP Stack</h2>
<p>The third method is to use the TCP stack directly.  In order to use this, you need to have the APN username and password.</p>
<pre>String url = "http://10.0.0.1;deviceside=true";</pre>
<h2>Wi-Fi</h2>
<p>The fourth method is to use wi-fi.  This is what I&#8217;m interested in right now.</p>
<pre>String url = "http://10.0.0.1;interface=wifi";</pre>
<h2>WAP 1.x</h2>
<p>The fifth method is to use WAP 1.x gateway.  This is supported over the carriers networks.  You have to contact the carriers to get a list of their WAP gateway parameters.</p>
<pre>String url = "http://10.0.0.1;WAPGatewayIP=127.0.0.1;WAPGatewayAPN=carrier.com.gprs";</pre>
<h2>WAP 2.0</h2>
<p>The sixth way is to use WAP 2.0.  You need to loop through the records and find the uid of the desired ServiceRecord in the ServiceBook.  This is simpler than WAP 1.x because you don&#8217;t need all the gateways and settings from the carriers.  This is supported as of 4.2 on the BlackBerry.</p>
<pre>// String uid = get from the device
String url = "http://10.0.0.1;ConnectionUID=" + uid;</pre>
<h2>Going Forward</h2>
<p>I would really like the device to try wi-fi first before attempting to use the potentially expensive data plan.  I am going to have to write some code to test the wi-fi first, and then attempt the data connection if this fails.  It is conceivable that the user wouldn&#8217;t want the app to transmit unless the wi-fi connection is available.  Not as simple as just opening up a connection and firing off a GET request.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/10/making-an-http-request-on-blackberry/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Blackberry development environment</title>
		<link>http://www.jasonrowland.com/2009/10/blackberry-development-environment/</link>
		<comments>http://www.jasonrowland.com/2009/10/blackberry-development-environment/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 23:02:35 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[BlackBerry]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=145</guid>
		<description><![CDATA[Blackberry applications are written in Java.  Since the java mantra is write once, test everywhere.  er.  sorry, run everywhere.  You would think that you could choose whatever OS you would like to develop for the Blackberry.  While the documentation claims you can write Blackberry code on any platform, the reality for a new developer is [...]]]></description>
			<content:encoded><![CDATA[<p>Blackberry applications are written in Java.  Since the java mantra is write once, test everywhere.  er.  sorry, run everywhere.  You would think that you could choose whatever OS you would like to develop for the Blackberry.  While the documentation claims you can write Blackberry code on any platform, the reality for a new developer is quite different.  The Eclipse plugin they offer only runs on Windows.  Very irritating considering I can run eclipse on my Mac as well as my Windows machine.  Rather than fight it, I am going with the flow and using Windows XP 32bit inside my Parallels virtual machine.</p>
<p>Very important that you pay attention to the version of eclipse that the plugin works with.  I didn&#8217;t and installed the lastest eclipse (3.5 as I write this).  I went to &#8220;Help &gt; install new software&#8230;&#8221; using &#8220;http://www.blackberry.com/go/eclipseUpdate&#8221;.  I got the following error:</p>
<pre>Cannot complete the install because one or more required items could not be found.
  Software being installed: BlackBerry JDE Plug-in for Eclipse 1.0.0.67 (net.rim.EclipseJDE.feature.group 1.0.0.67)
  Missing requirement: BlackBerry JDE Plug-in for Eclipse 1.0.0.67 (net.rim.EclipseJDE.feature.group 1.0.0.67)
  requires 'org.eclipse.debug.ui [3.4.0,3.5.0)' but it could not be found</pre>
<p>I had to download the gannymede 3.4.2 version of eclipse and install it.  Then I did the software update using the http://www.blackberry.com/go/eclipseUpdate URL.  It prompted me half a dozen times for my Blackberry Developer zone ID.  I dutifully entered it each time (annoying).  After this, I had a working environment.</p>
<p>In the <a href="http://www.blackberry.com/DevMediaLibrary/view.do?name=eclipseJDE">BlackBerry JDE Plug-in for Eclipse Installation and Configuration</a> demo video, They show configuring the BlackBerry workspace.  Well, this option is not enabled until you created a BlackBerry project.  Also in this video, you will see them run the simulator just by clicking run.  This did not work for me.  In order to actually launch the application in the simulator, you need to right click the project and select &#8220;Activate for Blackberry&#8221;.  If you don&#8217;t do this, Eclipse will launch the simulator and you will see debug output, but your project will not show up on the device.</p>
<p>The next step is to get it working on an actual BlackBerry device.  When I first attempted this, it would not work with my old version of parallels.  I updated to the latest build of parallels and then Windows could recognize the USB device.  My mac took control and parallels did not prompt me like it usually does when I connect a USB device.  There is an icon in the lower right of the frame.  Click the USB icon there and select &#8220;Research in Motion&#8221;</p>
<p>I haven&#8217;t been able to get the Eclipse IDE to install and run the application on my device.  I&#8217;ve had to use the tool JavaLoader.exe which is located in the bin directory of your JDE installation.</p>
<pre>JavaLoader.exe -usb load HelloWorld.jad
JavaLoader.exe -usb erase -f HelloWorld.jad</pre>
<p>These commands will install and remove your application.  This assumes that the bin directory is in your path and you are in the location where your *.jad and *.cod file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/10/blackberry-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

