<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Blackberry WebBitmapField</title>
	<atom:link href="http://www.coderholic.com/blackberry-webbitmapfield/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderholic.com/blackberry-webbitmapfield/</link>
	<description>Addicted to Development</description>
	<lastBuildDate>Sun, 05 Sep 2010 22:12:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Blink</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-11173</link>
		<dc:creator>Blink</dc:creator>
		<pubDate>Sun, 01 Aug 2010 05:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-11173</guid>
		<description>Great work! Works perfectly!</description>
		<content:encoded><![CDATA[<p>Great work! Works perfectly!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ysnky</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-9827</link>
		<dc:creator>ysnky</dc:creator>
		<pubDate>Tue, 08 Jun 2010 18:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-9827</guid>
		<description>hi,
i works fine on my simulator, but does not work on device 9000. i make http connection to get any data from my device so i think problem is not relevant with connection.
thanks in advance.</description>
		<content:encoded><![CDATA[<p>hi,<br />
i works fine on my simulator, but does not work on device 9000. i make http connection to get any data from my device so i think problem is not relevant with connection.<br />
thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-9532</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Thu, 20 May 2010 09:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-9532</guid>
		<description>Hey guys  problem solved just change 
this line

connection = (HttpConnection) Connector.open(url, Connector.READ, true);

to

if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
    connection = (HttpConnection) Connector.open(url+ &quot;;interface=wifi&quot;,Connector.READ_WRITE,
                                        true);
                                        } else {
                                               connection = (HttpConnection) Connector.open(url+&quot;;deviceside=true&quot;, Connector.READ_WRITE,
                                        true);

                                        }</description>
		<content:encoded><![CDATA[<p>Hey guys  problem solved just change<br />
this line</p>
<p>connection = (HttpConnection) Connector.open(url, Connector.READ, true);</p>
<p>to</p>
<p>if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {<br />
    connection = (HttpConnection) Connector.open(url+ &#8220;;interface=wifi&#8221;,Connector.READ_WRITE,<br />
                                        true);<br />
                                        } else {<br />
                                               connection = (HttpConnection) Connector.open(url+&#8221;;deviceside=true&#8221;, Connector.READ_WRITE,<br />
                                        true);</p>
<p>                                        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-9531</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Thu, 20 May 2010 09:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-9531</guid>
		<description>Hey guys  problem solved just change 
this line

connection = (HttpConnection) Connector.open(url, Connector.READ, true);

to

if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
    connection = (HttpConnection) Connector.open(url+ &quot;;interface=wifi&quot;,Connector.READ_WRITE,
                                        true);</description>
		<content:encoded><![CDATA[<p>Hey guys  problem solved just change<br />
this line</p>
<p>connection = (HttpConnection) Connector.open(url, Connector.READ, true);</p>
<p>to</p>
<p>if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {<br />
    connection = (HttpConnection) Connector.open(url+ &#8220;;interface=wifi&#8221;,Connector.READ_WRITE,<br />
                                        true);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-9525</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Wed, 19 May 2010 12:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-9525</guid>
		<description>Hi Friends,
          I tried above code but code hangs on  &quot;inputStream = connection.openInputStream();&quot; and after 2 min it return null. i dont have MDS but when i send other http request i am getting response.
can any one tell what might be the reason. 

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi Friends,<br />
          I tried above code but code hangs on  &#8220;inputStream = connection.openInputStream();&#8221; and after 2 min it return null. i dont have MDS but when i send other http request i am getting response.<br />
can any one tell what might be the reason. </p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: devao</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-8687</link>
		<dc:creator>devao</dc:creator>
		<pubDate>Wed, 24 Mar 2010 15:41:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-8687</guid>
		<description>i found it, i have only wifi on device and mds on simulator</description>
		<content:encoded><![CDATA[<p>i found it, i have only wifi on device and mds on simulator</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-8685</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 24 Mar 2010 12:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-8685</guid>
		<description>Hi Devao - Have you tried debugging it on the device, to see if you get any error messages?</description>
		<content:encoded><![CDATA[<p>Hi Devao &#8211; Have you tried debugging it on the device, to see if you get any error messages?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: devao</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-8674</link>
		<dc:creator>devao</dc:creator>
		<pubDate>Tue, 23 Mar 2010 20:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-8674</guid>
		<description>I have this code working on simulator but not on device (bold 9000 for both), any ideas !!</description>
		<content:encoded><![CDATA[<p>I have this code working on simulator but not on device (bold 9000 for both), any ideas !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Strange</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-6559</link>
		<dc:creator>Peter Strange</dc:creator>
		<pubDate>Fri, 18 Dec 2009 23:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-6559</guid>
		<description>Ben,

Thanks for responding to my comments.

Apologies, re point (c), I&#039;ve checked and you are right.  Readers, please ignore my comment.  If I could edit that out, I would. 

Re (b) and (c), I have similar code, which implements an &#039;error&#039; callback, in addition to a data callback. The data callback returns a byte array.  The error call back returns a code indicating where the error occurred, a description and the Exception (if any).  

As noted, this is a good sample, and I have directed people this way.  My comments were made as a result of a poster on a forum who I suspect used this code, without really understanding it, and then could not debug it when it failed.  I wanted to make sure that people who used this realised that it was a sample and not a piece of robust production code.

Just so that you are aware, logging is probably the biggest issue that I have with this code, that makes me say it is not production level code.  

Whether you make a connection or not can depend on the Service plan of the user and the connection suffix added to the URL.  With http requests potentially being passed through proxy servers and gateways, the data you get back to a BlackBerry can depend on the connection method you have used and the Headers you and the Server have put on the http request and response.  So when a piece of code like this fails in a customer situation, there has to be some way that the customer can easily provide the developer with information about what it was trying to do and where it has failed.  There is only limited information available here (for example there is no logging of the headers returned or the data prior to it being processed).

The fact that there is no logging in a sample is absolutely fine - logging will just complicate the explanation.

I hope this is helpful, I&#039;m sorry if my comments sounded a bit harsh, and also apologies once again for misreading a part of the code, which lead me to think it was faulty.</description>
		<content:encoded><![CDATA[<p>Ben,</p>
<p>Thanks for responding to my comments.</p>
<p>Apologies, re point (c), I&#8217;ve checked and you are right.  Readers, please ignore my comment.  If I could edit that out, I would. </p>
<p>Re (b) and (c), I have similar code, which implements an &#8216;error&#8217; callback, in addition to a data callback. The data callback returns a byte array.  The error call back returns a code indicating where the error occurred, a description and the Exception (if any).  </p>
<p>As noted, this is a good sample, and I have directed people this way.  My comments were made as a result of a poster on a forum who I suspect used this code, without really understanding it, and then could not debug it when it failed.  I wanted to make sure that people who used this realised that it was a sample and not a piece of robust production code.</p>
<p>Just so that you are aware, logging is probably the biggest issue that I have with this code, that makes me say it is not production level code.  </p>
<p>Whether you make a connection or not can depend on the Service plan of the user and the connection suffix added to the URL.  With http requests potentially being passed through proxy servers and gateways, the data you get back to a BlackBerry can depend on the connection method you have used and the Headers you and the Server have put on the http request and response.  So when a piece of code like this fails in a customer situation, there has to be some way that the customer can easily provide the developer with information about what it was trying to do and where it has failed.  There is only limited information available here (for example there is no logging of the headers returned or the data prior to it being processed).</p>
<p>The fact that there is no logging in a sample is absolutely fine &#8211; logging will just complicate the explanation.</p>
<p>I hope this is helpful, I&#8217;m sorry if my comments sounded a bit harsh, and also apologies once again for misreading a part of the code, which lead me to think it was faulty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.coderholic.com/blackberry-webbitmapfield/comment-page-1/#comment-6536</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 17 Dec 2009 19:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dowling.me.uk/blog/blackberry-webbitmapfield/#comment-6536</guid>
		<description>Hi Peter,

Thanks for taking the time to suggest some improvements. Point (a) is definitely a change worth making. 

You&#039;re right that when we&#039;re dealing with images it doesn&#039;t make a lot of sense to convert the binary data into a string, but the getWebData() method is general purpose, and when grabbing data from the web I&#039;m usually after a string. If you&#039;re taking this code and want to use it just for grabbing images then certainly it might be worth changing.

As for point (c) I think you&#039;re mistaken. Note that any exceptions thrown in the getWebData method are caught, and result in the &quot;Exception...&quot; string being returned. It isn&#039;t the nicest way of handing the error, but if you know of a better way of passing that information to a callback I&#039;d love to know.

Thanks, Ben</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Thanks for taking the time to suggest some improvements. Point (a) is definitely a change worth making. </p>
<p>You&#8217;re right that when we&#8217;re dealing with images it doesn&#8217;t make a lot of sense to convert the binary data into a string, but the getWebData() method is general purpose, and when grabbing data from the web I&#8217;m usually after a string. If you&#8217;re taking this code and want to use it just for grabbing images then certainly it might be worth changing.</p>
<p>As for point (c) I think you&#8217;re mistaken. Note that any exceptions thrown in the getWebData method are caught, and result in the &#8220;Exception&#8230;&#8221; string being returned. It isn&#8217;t the nicest way of handing the error, but if you know of a better way of passing that information to a callback I&#8217;d love to know.</p>
<p>Thanks, Ben</p>
]]></content:encoded>
	</item>
</channel>
</rss>
