<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lubos Mobile Development Blog</title>
	<atom:link href="http://lubospmobile.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lubospmobile.wordpress.com</link>
	<description>Lubos Mobile Development Blog</description>
	<lastBuildDate>Mon, 29 Aug 2011 14:48:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lubospmobile.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Lubos Mobile Development Blog</title>
		<link>http://lubospmobile.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lubospmobile.wordpress.com/osd.xml" title="Lubos Mobile Development Blog" />
	<atom:link rel='hub' href='http://lubospmobile.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Getting BlackBerry OS Version</title>
		<link>http://lubospmobile.wordpress.com/2010/01/19/getting-blackberry-os-version/</link>
		<comments>http://lubospmobile.wordpress.com/2010/01/19/getting-blackberry-os-version/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 23:25:43 +0000</pubDate>
		<dc:creator>lubosp</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[BBlackBerry]]></category>
		<category><![CDATA[OS]]></category>

		<guid isPermaLink="false">http://lubospmobile.wordpress.com/2010/01/19/getting-blackberry-os-version/</guid>
		<description><![CDATA[It might be handy to get BlackBerry OS version when developing for multiple versions of BlackBerry OS. Following is slightly modified code I took BlackBerry Forums (sorry cannot find the post, but all the credit goes to the original author of the post): Posted in BlackBerry Tagged: BBlackBerry, OS<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=15&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It might be handy to get BlackBerry OS version when developing for multiple versions of BlackBerry OS. Following is slightly modified code I took BlackBerry Forums (sorry cannot find the post, but all the credit goes to the original author of the post):</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:42908d80-cee9-4286-a846-c3cb4e8d22bc" class="wlWriterEditableSmartContent">
<pre>
<pre class="brush: java;">
    public static String getOSVersion() {
        String swVersion = null;
        ApplicationManager appMan = ApplicationManager.getApplicationManager();
        ApplicationDescriptor[] appDes = appMan.getVisibleApplications();

        int size = appDes.length;
        for (int i = 0; i &lt; size; i++){
            if ((appDes[i].getModuleName()).equals(&quot;net_rim_bb_ribbon_app&quot;)) {
                swVersion = stripBuildId(appDes[i].getVersion());
                break;
            }
        }
        return swVersion;
    }

    public static int[] getOSVersionInt() {
        String version = getOSVersion();
        Vector result = new Vector();
        int num = version.length();
        int start = 0;
        int end = 0;
        for (int i = 0; i &lt; num; i++) {
            char ch = version.charAt(i);
            if (ch == '.' || i == num - 1) {
                end = (i == num - 1) ? i + 1 : i;
                result.addElement(version.substring(start, end));
                start = end + 1;
            }
        }
        num = result.size();
        int[] resultArr = new int[num];
        for (int i = 0; i &lt; num; i++) resultArr[i] = Integer.parseInt((String)result.elementAt(i));

        return resultArr;
    }

    public static String getUserAgent() {
        String version = getOSVersion();
        return &quot;BlackBerry&quot; + DeviceInfo.getDeviceName() + &quot;/&quot; + version + &quot; &quot;
        + &quot;Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/&quot; + Branding.getVendorId();
    }

    private static String stripBuildId(String version) {
        int index = version.lastIndexOf('.');
        return version.substring(0, index);
    }
</pre>
</pre>
</div>
<br />Posted in BlackBerry Tagged: BBlackBerry, OS <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lubospmobile.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lubospmobile.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lubospmobile.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=15&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lubospmobile.wordpress.com/2010/01/19/getting-blackberry-os-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b5785af80dfabfae5a556571af1ddd7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lubosp</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry models table with screen resolution and supported operating system</title>
		<link>http://lubospmobile.wordpress.com/2010/01/13/blackberry-models-table-with-screen-resolution-and-supported-operating-system/</link>
		<comments>http://lubospmobile.wordpress.com/2010/01/13/blackberry-models-table-with-screen-resolution-and-supported-operating-system/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 23:25:51 +0000</pubDate>
		<dc:creator>lubosp</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[models]]></category>

		<guid isPermaLink="false">http://lubospmobile.wordpress.com/2010/01/13/blackberry-models-table-with-screen-resolution-and-supported-operating-system/</guid>
		<description><![CDATA[Following table lists BlackBerry devices, their screen resolution, interaction, supported operating system and icon sizes: Model Resolution Interaction OS Icons BlackBerry® 7100 Series 240 x 260 trackwheel &#160; • Icon layout: 60 x 55 pixels • Zen layout: 48 x 36 pixels BlackBerry® 8700 Series 320 x 240 trackwheel 4.2.1 • Icon layout: 53 x [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=11&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following table lists BlackBerry devices, their screen resolution, interaction, supported operating system and icon sizes:</p>
<table border="1" cellspacing="0" cellpadding="2" width="725">
<tbody>
<tr>
<td valign="top" width="168"><strong>Model</strong></td>
<td valign="top" width="101"><strong>Resolution</strong></td>
<td valign="top" width="105"><strong>Interaction</strong></td>
<td valign="top" width="166"><strong>OS</strong></td>
<td valign="top" width="183"><strong>Icons</strong></td>
</tr>
<tr>
<td valign="top" width="167">
<p>BlackBerry® 7100 Series </p>
</td>
<td valign="top" width="103">
<p>240 x 260</p>
</td>
<td valign="top" width="109">trackwheel</td>
<td valign="top" width="165">&#160;</td>
<td valign="top" width="183">
<p>• Icon layout: 60 x 55 pixels           <br />• Zen layout: 48 x 36 pixels</p>
</td>
</tr>
<tr>
<td valign="top" width="166">
<p>BlackBerry® 8700 Series</p>
</td>
<td valign="top" width="104">
<p>320 x 240</p>
</td>
<td valign="top" width="112">trackwheel</td>
<td valign="top" width="163">
<p>4.2.1</p>
</td>
<td valign="top" width="183">
<p>• Icon layout: 53 x 48 pixels           <br />• Zen layout: 48 x 36 pixels</p>
</td>
</tr>
<tr>
<td valign="top" width="165">
<p>BlackBerry® 8800 Series</p>
</td>
<td valign="top" width="105">
<p>320 x 240 </p>
</td>
<td valign="top" width="114">trackball</td>
<td valign="top" width="163">4.5.0</td>
<td valign="top" width="183">
<p>• Icon layout: 53 x 48 pixels           <br />• Zen layout: 48 x 36 pixels</p>
</td>
</tr>
<tr>
<td valign="top" width="165">
<p>BlackBerry® Bold™ 9000            <br />smartphone</p>
</td>
<td valign="top" width="105">
<p>480 x 320</p>
</td>
<td valign="top" width="116">trackball</td>
<td valign="top" width="162">4.6.0</td>
<td valign="top" width="183">80 x 80 pixels</td>
</tr>
<tr>
<td valign="top" width="164">
<p>BlackBerry® Curve™ 8300 Series            </p>
</td>
<td valign="top" width="105">
<p>320 x 240</p>
</td>
<td valign="top" width="118">trackball</td>
<td valign="top" width="162">4.5.0</td>
<td valign="top" width="183">
<p>• Icon layout: 53 x 48 pixels           <br />• Zen layout: 48 x 36 pixels</p>
</td>
</tr>
<tr>
<td valign="top" width="164">
<p>BlackBerry® Curve™ 8350i            <br />smartphone             <br />BlackBerry® Curve™ 8500 Series</p>
</td>
<td valign="top" width="105">
<p>320 x 240</p>
</td>
<td valign="top" width="119">trackpad</td>
<td valign="top" width="161">4.6.1</td>
<td valign="top" width="183">52 x 52 pixels</td>
</tr>
<tr>
<td valign="top" width="164">
<p>BlackBerry® Curve™ 8900            <br />smartphone </p>
</td>
<td valign="top" width="105">
<p>480 x 360 </p>
</td>
<td valign="top" width="120">trackball</td>
<td valign="top" width="161">4.6.1</td>
<td valign="top" width="183">80 x 80 pixels</td>
</tr>
<tr>
<td valign="top" width="164">
<p>BlackBerry® Pearl™ 8100 Series</p>
</td>
<td valign="top" width="105">
<p>240 x 260</p>
</td>
<td valign="top" width="121">trackball</td>
<td valign="top" width="161">4.5.0</td>
<td valign="top" width="183">
<p>• Icon layout: 60 x 55 pixels           <br />• Zen layout: 48 x 36 pixels</p>
</td>
</tr>
<tr>
<td valign="top" width="164">
<p>BlackBerry® Pearl™ Flip 8200 Series </p>
</td>
<td valign="top" width="105">
<p>240 x 320</p>
</td>
<td valign="top" width="122">trackball</td>
<td valign="top" width="160">
<p>4.6.0</p>
</td>
<td valign="top" width="183">46 x 46 pixels</td>
</tr>
<tr>
<td valign="top" width="163">
<p>BlackBerry® Storm™ 9500 Series</p>
</td>
<td valign="top" width="105">
<p>360 x 480</p>
</td>
<td valign="top" width="123">touch screen</td>
<td valign="top" width="160">5.0.0</td>
<td valign="top" width="183">73 x 73 pixels</td>
</tr>
<tr>
<td valign="top" width="163">
<p>BlackBerry® Tour™ 9600 Series </p>
</td>
<td valign="top" width="105">
<p>480 x 360</p>
</td>
<td valign="top" width="123">trackball</td>
<td valign="top" width="160">4.7.1</td>
<td valign="top" width="183">80 x 80 pixels</td>
</tr>
<tr>
<td valign="top" width="163">BlackBerry® Bold™ 9700 smartphone</td>
<td valign="top" width="105">&#160;</td>
<td valign="top" width="123">trackpad</td>
<td valign="top" width="160">5.0.0</td>
<td valign="top" width="183">80 x 80 pixels</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<ul>
<li>See more <a href="http://en.wikipedia.org/wiki/BlackBerry_OS">info about BlackBerry OS here</a>.</li>
<li>BlackBerry <a href="http://na.blackberry.com/eng/devices/compare/">device comparison</a> can be found on official BlackBerry site. </li>
<li><a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/What_Is_-_Appropriate_version_of_the_BlackBerry_JDE.html?nodeid=1287169&amp;vernum=0">What Is &#8211; Appropriate version of the BlackBerry JDE</a></li>
<li><a href="http://docs.blackberry.com/en/developers/deliverables/6625/Dimensions_for_screens_images_and_icons_476251_11.jsp">Default themes and dimensions for screens and application icons</a> on <a name="ph_cf_125632359104674"></a>BlackBerry devices</li>
</ul>
<br />Posted in BlackBerry Tagged: BlackBerry, models <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lubospmobile.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lubospmobile.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lubospmobile.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=11&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lubospmobile.wordpress.com/2010/01/13/blackberry-models-table-with-screen-resolution-and-supported-operating-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b5785af80dfabfae5a556571af1ddd7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lubosp</media:title>
		</media:content>
	</item>
		<item>
		<title>How to capture swipe gestures events on BlackBerry with touch screen</title>
		<link>http://lubospmobile.wordpress.com/2010/01/12/how-to-capture-swipe-gestures-events-on-blackberry-with-touch-screen/</link>
		<comments>http://lubospmobile.wordpress.com/2010/01/12/how-to-capture-swipe-gestures-events-on-blackberry-with-touch-screen/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 00:53:25 +0000</pubDate>
		<dc:creator>lubosp</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[gesture]]></category>

		<guid isPermaLink="false">http://lubospmobile.wordpress.com/2010/01/12/how-to-capture-swipe-gestures-events-on-blackberry-with-touch-screen/</guid>
		<description><![CDATA[Following code captures swipe gestures events on touch screen BlackBerry like Storm: touchEvent method should be implemented for a screen that wishes to process swipe gestures, see TouchEvent Javadoc for details. Posted in BlackBerry Tagged: BlackBerry, gesture<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=9&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following code captures swipe gestures events on touch screen BlackBerry like Storm:</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:6edff7cf-574a-4d5f-a8b8-5c38280fd3ef" class="wlWriterEditableSmartContent">
<pre>
<pre class="brush: java;">
protected boolean touchEvent(TouchEvent message) {
  switch(message.getEvent()) {
  case TouchEvent.GESTURE:
    TouchGesture gesture = message.getGesture();
     switch(gesture.getEvent()) {
     case TouchGesture.SWIPE:
       if(gesture.getSwipeDirection() == TouchGesture.SWIPE_EAST) {
         Dialog.alert(&quot;Eastward swipe occurred&quot;);
         return true;
       } else if(gesture.getSwipeDirection() == TouchGesture.SWIPE_WEST) {
         Dialog.alert(&quot;Westward swipe occurred&quot;);
         return true;
       }
     }
  }
  return super.touchEvent(message);
}
</pre>
</pre>
</div>
<p><em>touchEvent</em> method should be implemented for a screen that wishes to process swipe gestures, see <em><a href="http://www.blackberry.com/developers/docs/4.7.0api/net/rim/device/api/ui/TouchEvent.html">TouchEvent Javadoc</a></em> for details.</p>
<br />Posted in BlackBerry Tagged: BlackBerry, gesture <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lubospmobile.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lubospmobile.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lubospmobile.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=9&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lubospmobile.wordpress.com/2010/01/12/how-to-capture-swipe-gestures-events-on-blackberry-with-touch-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b5785af80dfabfae5a556571af1ddd7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lubosp</media:title>
		</media:content>
	</item>
		<item>
		<title>How to set Http connection timeout for BlackBerry</title>
		<link>http://lubospmobile.wordpress.com/2010/01/12/how-to-set-http-connection-timeout-for-blackberry/</link>
		<comments>http://lubospmobile.wordpress.com/2010/01/12/how-to-set-http-connection-timeout-for-blackberry/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:35:15 +0000</pubDate>
		<dc:creator>lubosp</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://lubospmobile.wordpress.com/2010/01/12/how-to-set-http-connection-timeout-for-blackberry/</guid>
		<description><![CDATA[BlackBerry API uses Connection class to establish http connection like: The problem is that if the connection cannot be established, it takes 2 min for a connection to timeout. To change the default timeout value, you can use url parameter ConnectionTimeout like: which sets the connection timeout to 10 second (in milliseconds). Posted in BlackBerry [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=7&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>BlackBerry API uses <em>Connection</em> class to establish http connection like:</p>
<pre>
<pre class="brush: java;">
HttpConnection hc = null; try {
   hc = (HttpConnection) Connector.open(url, Connector.READ, true);
   hc.setRequestMethod(HttpConnection.GET);
   int response = hc.getResponseCode();
</pre>
</pre>
<p>The problem is that if the connection cannot be established, it takes 2 min for a connection to timeout. To change the default timeout value, you can use url parameter <em>ConnectionTimeout </em>like:</p>
<pre>
<pre class="brush: java;">
hc = (HttpConnection) Connector.open(url + &amp;quot;;ConnectionTimeout=10000&amp;quot;, Connector.READ, true);
</pre>
</pre>
<p>which sets the connection timeout to 10 second (in milliseconds).</p>
<br />Posted in BlackBerry Tagged: connection, http <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lubospmobile.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lubospmobile.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lubospmobile.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=7&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lubospmobile.wordpress.com/2010/01/12/how-to-set-http-connection-timeout-for-blackberry/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b5785af80dfabfae5a556571af1ddd7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lubosp</media:title>
		</media:content>
	</item>
		<item>
		<title>Lubos Mobile Development Blog</title>
		<link>http://lubospmobile.wordpress.com/2010/01/11/lubos-mobile-development-blog/</link>
		<comments>http://lubospmobile.wordpress.com/2010/01/11/lubos-mobile-development-blog/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 04:21:52 +0000</pubDate>
		<dc:creator>lubosp</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[smarthone]]></category>

		<guid isPermaLink="false">http://lubospmobile.wordpress.com/2010/01/11/lubos-mobile-development-blog/</guid>
		<description><![CDATA[This blog is intended to capture my experiences with developing mobile applications in Java for smartphones. Mainly for BlackBerry platform, and hopefully for Android in the future. I am not big fan of iPhone and I do not own Mac, so iPhone development is probably out of question. Posted in Android, BlackBerry, mobile Tagged: Android, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=6&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog is intended to capture my experiences with developing mobile applications in Java for smartphones. Mainly for BlackBerry platform, and hopefully for Android in the future. I am not big fan of iPhone and I do not own Mac, so iPhone development is probably out of question.</p>
<br />Posted in Android, BlackBerry, mobile Tagged: Android, BlackBerry, mobile, smarthone <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lubospmobile.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lubospmobile.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lubospmobile.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lubospmobile.wordpress.com&amp;blog=11384754&amp;post=6&amp;subd=lubospmobile&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lubospmobile.wordpress.com/2010/01/11/lubos-mobile-development-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b5785af80dfabfae5a556571af1ddd7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lubosp</media:title>
		</media:content>
	</item>
	</channel>
</rss>
