<?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>Life by Bits &#38; Numbers &#187; Mobile</title>
	<atom:link href="http://www.inteist.com/tag/mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.inteist.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 19:07:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mobile advertising by the numbers &#8211; inforgraphics from InnerActive</title>
		<link>http://www.inteist.com/2012/02/mobile-advertising-by-the-numbers-inforgraphics-from-inneractive/</link>
		<comments>http://www.inteist.com/2012/02/mobile-advertising-by-the-numbers-inforgraphics-from-inneractive/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:07:49 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Enlightening]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Infographics]]></category>
		<category><![CDATA[InnerActive]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=676</guid>
		<description><![CDATA[An interesting infographic from the mobile advertising provider and mediation company &#8211; InnerActive was produced encompassing the timeline between the last year&#8217;s MWC in Barcelona and this year&#8217;s MWC. &#160; Related posts: Great collection of mobile UI resources Building Secure Mobile Applications &#8211; AT&#038;T free webcast BlackBerry Developer Conference 2010 is tomorrow
Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/' rel='bookmark' title='Great collection of mobile UI resources'>Great collection of mobile UI resources</a></li>
<li><a href='http://www.inteist.com/2010/03/building-secure-mobile-applications-att-free-webcast/' rel='bookmark' title='Building Secure Mobile Applications &#8211; AT&amp;T free webcast'>Building Secure Mobile Applications &#8211; AT&#038;T free webcast</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2012/02/mobile-advertising-by-the-numbers-inforgraphics-from-inneractive/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2012/02/mobile-advertising-by-the-numbers-inforgraphics-from-inneractive/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F02%2Fmobile-advertising-by-the-numbers-inforgraphics-from-inneractive%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F02%2Fmobile-advertising-by-the-numbers-inforgraphics-from-inneractive%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Infographics,InnerActive,Mobile&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>An interesting infographic from the mobile advertising provider and mediation company &#8211; InnerActive was produced encompassing the timeline between the last year&#8217;s MWC in Barcelona and this year&#8217;s MWC.</p>
<p>&nbsp;</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2012/02/Mobile-advertising-infographics.jpg" rel="lightbox[676]"><img class="aligncenter size-full wp-image-677" title="Mobile advertising infographics" src="http://www.inteist.com/wp-content/uploads/2012/02/Mobile-advertising-infographics.jpg" alt="" width="620" height="2600" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/' rel='bookmark' title='Great collection of mobile UI resources'>Great collection of mobile UI resources</a></li>
<li><a href='http://www.inteist.com/2010/03/building-secure-mobile-applications-att-free-webcast/' rel='bookmark' title='Building Secure Mobile Applications &#8211; AT&amp;T free webcast'>Building Secure Mobile Applications &#8211; AT&#038;T free webcast</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2012/02/mobile-advertising-by-the-numbers-inforgraphics-from-inneractive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great collection of mobile UI resources</title>
		<link>http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/</link>
		<comments>http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 07:12:38 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Enlightening]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=672</guid>
		<description><![CDATA[A compilation of mobile UI resources: http://www.pttrns.com http://www.LovelyUI.com http://www.mobileawesomeness.com/ http://mobile-patterns.com &#160; Enjoy! Related posts: Building Secure Mobile Applications &#8211; AT&#038;T free webcast
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/03/building-secure-mobile-applications-att-free-webcast/' rel='bookmark' title='Building Secure Mobile Applications &#8211; AT&amp;T free webcast'>Building Secure Mobile Applications &#8211; AT&#038;T free webcast</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F01%2Fgreat-collection-of-mobile-ui-resources%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F01%2Fgreat-collection-of-mobile-ui-resources%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Mobile,UI,UX&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A compilation of mobile UI resources:</p>
<ul>
<li>
<h3><a href="http://www.pttrns.com/" target="_blank">http://www.pttrns.com</a></h3>
</li>
<li>
<h3><a href="http://www.lovelyui.com/" target="_blank">http://www.LovelyUI.com</a></h3>
</li>
<li>
<h3><a href="http://www.mobileawesomeness.com/" target="_blank">http://www.mobileawesomeness.<wbr>com/</wbr></a></h3>
</li>
<li>
<h3><a href="http://mobile-patterns.com/" target="_blank">http://mobile-patterns.com</a></h3>
</li>
</ul>
<p>&nbsp;</p>
<p>Enjoy! <img src='http://www.inteist.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/03/building-secure-mobile-applications-att-free-webcast/' rel='bookmark' title='Building Secure Mobile Applications &#8211; AT&amp;T free webcast'>Building Secure Mobile Applications &#8211; AT&#038;T free webcast</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2012/01/great-collection-of-mobile-ui-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry OS distribution March/April 2011</title>
		<link>http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/</link>
		<comments>http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 04:46:25 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[RIM]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=540</guid>
		<description><![CDATA[Just got an email from RIM with news and such and noticed the link to the OS center they run on their website to help developers choose which BB OS to target. After looking at the stats, I decided to make a comparison and see how the official stats from RIM differ from what I [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/blackberry-os-distribution-january-2012/' rel='bookmark' title='BlackBerry OS distribution January 2012'>BlackBerry OS distribution January 2012</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/' rel='bookmark' title='BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems'>BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2011%2F04%2Fblackberry-os-distribution-marchapril-2011%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2011%2F04%2Fblackberry-os-distribution-marchapril-2011%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Blackberry,Mobile,OS,RIM,Statistics&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Just got an email from RIM with news and such and noticed the link to the OS center they run on their website to help developers choose which BB OS to target. After looking at the stats, I decided to make a comparison and see how the official stats from RIM differ from what I see within my applications.</p>
<p>Here&#8217;s the distribution published by RIM (dated March 3-d) I am not sure what they compiled into the March 3-d, i.e. what the timestamp of March 3-d actually means. Was it based on OS tracked for March 3-d, was it for last month, week or such. I couldn&#8217;t find that information.</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2011/04/Screen-shot-2011-04-28-at-12.12.36-AM.png" rel="lightbox[540]"><img class="aligncenter size-medium wp-image-541" title="BlackBerry OS distribution March 3d 2011" src="http://www.inteist.com/wp-content/uploads/2011/04/Screen-shot-2011-04-28-at-12.12.36-AM-300x196.png" alt="" width="300" height="196" /></a>And below is the distribution I have compiled from the data for the month of April 2011 (a month worth of data)</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2011/04/BlackBerry-OS-distribution-April-2011.png" rel="lightbox[540]"><img class="aligncenter size-medium wp-image-542" title="BlackBerry OS distribution April 2011" src="http://www.inteist.com/wp-content/uploads/2011/04/BlackBerry-OS-distribution-April-2011-300x286.png" alt="" width="300" height="286" /></a>The breakdown by OS version is not identical but the picture is pretty much similar, except that <del>my chart is much nicer</del> I&#8217;ve got 6.1 devices (hmmm!) and the 5.0 OS section is a bit larger for my statistics than it is for the official statistics. But again, the official statistics are pretty much 2 month old now and actually since the rest of the sections pretty much coincide with the official statistics, I would assume that the number of OS 5.0 just got larger in these 2 month; which by itself is great news for BB developers. Hooray to that and I will try to keep up with statistics to see how the distribution shifts, maybe another post in couple month or when something interesting happens. Let me know in the comments if you&#8217;d like to see something like that in the future and whether it was useful for you.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/blackberry-os-distribution-january-2012/' rel='bookmark' title='BlackBerry OS distribution January 2012'>BlackBerry OS distribution January 2012</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/' rel='bookmark' title='BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems'>BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs</title>
		<link>http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/</link>
		<comments>http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 05:30:07 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=446</guid>
		<description><![CDATA[I wrote yesterday about [link id='434' text="my (mostly) negative experience working with these companies"], but some of you might give it a try and maybe your results will be much better or maybe things have actually improved lately. In any case, the code here should get you up to speed covering most of the dirty work of working with these companies' APIs.

I will post 4 classes here:
<ul>
	<li><strong>AdGrabber </strong>-  main abstract class to give all other specific grabbers structure and save some repeating code</li>
	<li><strong>MillenialAdGrabber </strong>- MillennialMedia specific grabber</li>
	<li><strong>NexAgeAdGrabber </strong>- right, NexAge specific grabber</li>
	<li><strong>SomaAdGrabber </strong>- the SMAATO ad grabber. Their ad platform is dubbed SOMA, hence the name</li>
</ul>
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/' rel='bookmark' title='In App Advertising on BlackBerry with QuattroWireless, MillennialMedia, SMAATO and NexAge a bitter experience'>In App Advertising on BlackBerry with QuattroWireless, MillennialMedia, SMAATO and NexAge a bitter experience</a></li>
<li><a href='http://www.inteist.com/2011/02/convert-argb-to-int-value-java/' rel='bookmark' title='Convert ARGB to int value (Java)'>Convert ARGB to int value (Java)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F12%2Fjava-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F12%2Fjava-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Blackberry,Mobile,Source+Code,Technical&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I wrote yesterday about <a href="http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/">my (mostly) negative experience working with these companies</a>, but some of you might give it a try and maybe your results will be much better or maybe things have actually improved lately. In any case, the code here should get you up to speed covering most of the dirty work of working with these companies&#8217; APIs.</p>
<p>I will post 4 classes here:</p>
<ul>
<li><strong>AdGrabber </strong>-  main abstract class to give all other specific grabbers structure and save some repeating code</li>
<li><strong>MillenialAdGrabber </strong>- MillennialMedia specific grabber</li>
<li><strong>NexAgeAdGrabber </strong>- right, NexAge specific grabber</li>
<li><strong>SomaAdGrabber </strong>- the SMAATO ad grabber. Their ad platform is dubbed SOMA, hence the name</li>
</ul>
<p>If you are using this code, please give an attribution when applicable with a link to this post.</p>
<p><span id="more-446"></span></p>
<h2><strong>AdGrabber </strong></h2>
<pre>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* Abstract class for ad unit grabbing. Inheriting subclasses will implement ad serving platform specific web service interfaces.<br />
&nbsp;*<br />
&nbsp;* Copyright: Creative Common Attribution http://creativecommons.org/licenses/by/3.0/<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000000; font-weight: bold;">class</span> AdGrabber <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> HashTableExt _adFieldPropertyBag<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> AdGrabber<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>adFieldPropertyBag <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_adFieldPropertyBag <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HashTableExt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_adFieldPropertyBag <span style="color: #339933;">=</span> adFieldPropertyBag<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; * Inheriting classes have to implement the grabbing and the parsing of the ad from the appropriate ad serving web service<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @return<br />
&nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- an {@link Ad} object populated with the values parsed from the appropriate ad serving web service<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> Ad grabTheAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> adResponseDoc <span style="color: #339933;">=</span> StreamUtils.<span style="color: #006633;">parseRemoteXML</span><span style="color: #009900;">&#40;</span>getRequestURL<span style="color: #009900;">&#40;</span>_adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> parseServerResponse<span style="color: #009900;">&#40;</span>adResponseDoc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">//Log error</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> EmptyAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">abstract</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> getRequestURL<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> Ad parseServerResponse<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; Ad ad <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>doc <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// basically = return null</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>gotProperAd<span style="color: #009900;">&#40;</span>doc<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>shouldParseAsImageAd<span style="color: #009900;">&#40;</span>doc<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ad <span style="color: #339933;">=</span> parseImageAd<span style="color: #009900;">&#40;</span>doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ad <span style="color: #339933;">=</span> parseTextAd<span style="color: #009900;">&#40;</span>doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setNetwork</span><span style="color: #009900;">&#40;</span>StringUtils.<span style="color: #006633;">getClassName</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// did NOT get a proper ad</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> EmptyAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athrowable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Throwable</span></a> t<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">//Log error</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">boolean</span> gotProperAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">abstract</span> TextAd parseTextAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">abstract</span> ImageAd parseImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000066; font-weight: bold;">boolean</span> shouldParseAsImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<h2><strong>MillenialAdGrabber </strong></h2>
<pre>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* Ad grabber that interfaces with Quattro Wireless service<br />
&nbsp;*<br />
&nbsp;* Copyright: Creative Common Attribution http://creativecommons.org/licenses/by/3.0/<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MillenialAdGrabber <span style="color: #000000; font-weight: bold;">extends</span> AdGrabber <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PUBLISHING CONSTANTS &nbsp; &nbsp; &nbsp; ------------------------------------------*/</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> APP_ID <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR_APP_ID&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------*/</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> MillenialAdGrabber<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param adFieldPropertyBag<br />
&nbsp; &nbsp; * @return<br />
&nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- The URL to be sent to the advertising web service<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> getRequestURL<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a> sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ads.mp.mydas.mobi/getAd.php5?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;apid=&quot;</span> <span style="color: #339933;">+</span> APP_ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;auid=&quot;</span> <span style="color: #339933;">+</span> BBInfo.<span style="color: #006633;">getUniqueDeviceHash</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;uip=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getIP</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// device IP </span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;ua=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getUserAgent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// USER AGENT</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AD response PARSING &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------------ */</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> gotProperAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; NodeList nl <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>NodeList<span style="color: #009900;">&#41;</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>nl <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> nl.<span style="color: #006633;">getLength</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> shouldParseAsImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">isTallScreen</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> _adFieldPropertyBag.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>AdAllocManager.<span style="color: #006633;">FETCH_IMAGE_ADS</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>StringUtils.<span style="color: #006633;">isEmpty</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> TextAd parseTextAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; TextAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TextAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the TEXT of the banner</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;altText&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> ImageAd parseImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; ImageAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ImageAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the IMAGE of the banner</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> imageURL <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getNodeTextCumulative</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; EncodedImage bannerImage <span style="color: #339933;">=</span> EncodedImage.<span style="color: #006633;">createEncodedImage</span><span style="color: #009900;">&#40;</span>StreamUtils.<span style="color: #006633;">readRemoteStream</span><span style="color: #009900;">&#40;</span>imageURL<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setImage</span><span style="color: #009900;">&#40;</span>bannerImage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; * Parse common values from the responce like the:<br />
&nbsp; &nbsp; * &nbsp;- tracking pixels/beacons<br />
&nbsp; &nbsp; * &nbsp;- the click URL<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param ad<br />
&nbsp; &nbsp; * @param doc<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> parseCommonAdValues<span style="color: #009900;">&#40;</span>Ad ad, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// CLICK URL</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setClickURL</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getNodeTextCumulative</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;clickUrl&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<h2><strong>NexAgeAdGrabber</strong></h2>
<pre>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* Copyright: Creative Common Attribution http://creativecommons.org/licenses/by/3.0/<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NexAgeAdGrabber <span style="color: #000000; font-weight: bold;">extends</span> AdGrabber <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> NexAgeAdGrabber<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PUBLISHING CONSTANTS &nbsp; &nbsp; &nbsp; ------------------------------------------*/</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> SITE_ID <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR_SITE_ID&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------*/</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param adFieldPropertyBag<br />
&nbsp; &nbsp; * @return<br />
&nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- The URL to be sent to the advertising web service<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> getRequestURL<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a> sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://admax.nexage.com/adServe?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;dcn=&quot;</span> <span style="color: #339933;">+</span> SITE_ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;pos=&quot;</span> <span style="color: #339933;">+</span> getAdPosition<span style="color: #009900;">&#40;</span>adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;ip=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getIP</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// device IP </span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;ua=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getUserAgent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// device USER AGENT</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;f=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;u(id)=&quot;</span> <span style="color: #339933;">+</span> BBInfo.<span style="color: #006633;">getUniqueDeviceHash</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> getAdPosition<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>adFieldPropertyBag <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> adFieldPropertyBag.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>AdAllocManager.<span style="color: #006633;">AD_POSITION</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//if we specified the ad position - return the specified ad position</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#41;</span> adFieldPropertyBag.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>AdAllocManager.<span style="color: #006633;">AD_POSITION</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// otherwise, use the &quot;imageonly&quot; or &quot;textonly&quot;, depending on the display size, or manual override</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">isTallScreen</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>adFieldPropertyBag <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> adFieldPropertyBag.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>AdAllocManager.<span style="color: #006633;">FETCH_IMAGE_ADS</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;imageonly&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;textonly&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> gotProperAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; Node adsNode <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ads&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>adsNode <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">int</span> adCount <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainteger+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Integer</span></a>.<span style="color: #006633;">parseInt</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>adsNode, <span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> adCount <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> ImageAd parseImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; ImageAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ImageAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the IMAGE of the banner</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> imageURL <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad:content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; EncodedImage bannerImage <span style="color: #339933;">=</span> EncodedImage.<span style="color: #006633;">createEncodedImage</span><span style="color: #009900;">&#40;</span>StreamUtils.<span style="color: #006633;">readRemoteStream</span><span style="color: #009900;">&#40;</span>imageURL<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setImage</span><span style="color: #009900;">&#40;</span>bannerImage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> TextAd parseTextAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; TextAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TextAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the TEXT of the banner</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad:text&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> shouldParseAsImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; Node node <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad:group&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> adType <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>node, <span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> adType.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;banner&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; * Parse common values from the responce like the:<br />
&nbsp; &nbsp; * &nbsp;- tracking pixels/beacons<br />
&nbsp; &nbsp; * &nbsp;- the click URL<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param ad<br />
&nbsp; &nbsp; * @param doc<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> parseCommonAdValues<span style="color: #009900;">&#40;</span>Ad ad, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// CLICK URL</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setClickURL</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// TRACKING PIXEL URLs - get only ones from the FIRST &nbsp;node (in case there are more than 1 ad in the response, only the first should be processed and the rest ignored)</span><br />
&nbsp; &nbsp; &nbsp; Node adEventsNode <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad:events&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; NodeList nl <span style="color: #339933;">=</span> adEventsNode.<span style="color: #006633;">getChildNodes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> nl.<span style="color: #006633;">getLength</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// If the tracking is of the &quot;display&quot; type - it is a tracking PIXEL URL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;display&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> nodeName <span style="color: #339933;">=</span> nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getFirstChild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getNodeName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>nodeName.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> trackingPx <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getFirstChild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ad.<span style="color: #006633;">addTrackingPixelURL</span><span style="color: #009900;">&#40;</span>trackingPx<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// otherwise, if it is of the &quot;click&quot; type - it is a CLICK tracking URL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;click&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> nodeName <span style="color: #339933;">=</span> nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getFirstChild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getNodeName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>nodeName.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> trackingPx <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getFirstChild</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ad.<span style="color: #006633;">addClickTrackingURL</span><span style="color: #009900;">&#40;</span>trackingPx<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<h2><strong>SomaAdGrabber</strong></h2>
<pre>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* Copyright © Comitic Software<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SOMAAdGrabber <span style="color: #000000; font-weight: bold;">extends</span> AdGrabber <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> SOMAAdGrabber<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>adFieldPropertyBag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PUBLISHING CONSTANTS &nbsp; &nbsp; &nbsp; ------------------------------------------*/</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> AD_SPACE <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR_AD_SPACE&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> PUBLISHER_ID <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR_PUB_ID&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> SOMA_API_VER <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;somaapi-318&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//This is the version of the API I used</span><br />
<br />
&nbsp; &nbsp;<span style="color: #666666; font-style: italic;">/* ------------------------------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;------------------------------------------*/</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param overrideImageAds<br />
&nbsp; &nbsp; * @return<br />
&nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- The URL to be sent to the advertising web service<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> getRequestURL<span style="color: #009900;">&#40;</span>HashTableExt adFieldPropertyBag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a> sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">StringBuffer</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://soma.smaato.net/oapi/reqAd.jsp?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;adspace=&quot;</span> <span style="color: #339933;">+</span> AD_SPACE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;pub=&quot;</span> <span style="color: #339933;">+</span> PUBLISHER_ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;client=&quot;</span> <span style="color: #339933;">+</span> SOMA_API_VER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;devip=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getIP</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// device IP </span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;device=&quot;</span> <span style="color: #339933;">+</span> URLTools.<span style="color: #006633;">urlEncodeBBForum</span><span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">getUserAgent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// device USER AGENT</span><br />
<br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> adMode <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>BBInfo.<span style="color: #006633;">isTallScreen</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>adFieldPropertyBag<span style="color: #339933;">!=</span><span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> adFieldPropertyBag.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>AdAllocManager.<span style="color: #006633;">FETCH_IMAGE_ADS</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;all&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;txt&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// &quot;all&quot; = IMAGE and TEXT; &quot;txt&quot; = TEXT only</span><br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;format=&quot;</span> <span style="color: #339933;">+</span> adMode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;ownid=&quot;</span> <span style="color: #339933;">+</span> BBInfo.<span style="color: #006633;">getUniqueDeviceHash</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;responce=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> gotProperAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//return ((NodeList) doc.getElementsByTagName(&quot;ads&quot;)).getLength() &amp;gt; 0 &amp;amp;&amp;amp; canProcessTheAd(doc);</span><br />
&nbsp; &nbsp; &nbsp; NodeList nl <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>NodeList<span style="color: #009900;">&#41;</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ads&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>nl <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> nl.<span style="color: #006633;">getLength</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span> &nbsp;<span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> canProcessTheAd<span style="color: #009900;">&#40;</span>doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">boolean</span> canProcessTheAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; Node node <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> actionType <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>node, <span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> actionType.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> ImageAd parseImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; ImageAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ImageAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the IMAGE of the banner</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> imageURL <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getNodeTextCumulative</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; EncodedImage bannerImage <span style="color: #339933;">=</span> EncodedImage.<span style="color: #006633;">createEncodedImage</span><span style="color: #009900;">&#40;</span>StreamUtils.<span style="color: #006633;">readRemoteStream</span><span style="color: #009900;">&#40;</span>imageURL<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setImage</span><span style="color: #009900;">&#40;</span>bannerImage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> TextAd parseTextAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; TextAd ad <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TextAd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; parseCommonAdValues<span style="color: #009900;">&#40;</span>ad, doc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//parse the TEXT of the banner</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;adtext&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ad<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">boolean</span> shouldParseAsImageAd<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; Node node <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ad&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> adType <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>node, <span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> adType.<span style="color: #006633;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">compareTo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;img&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp; &nbsp; * Parse common values from the responce like the:<br />
&nbsp; &nbsp; * &nbsp;- tracking pixels/beacons<br />
&nbsp; &nbsp; * &nbsp;- the click URL<br />
&nbsp; &nbsp; *<br />
&nbsp; &nbsp; * @param ad<br />
&nbsp; &nbsp; * @param doc<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> parseCommonAdValues<span style="color: #009900;">&#40;</span>Ad ad, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocument+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Document</span></a> doc<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// CLICK URL</span><br />
&nbsp; &nbsp; &nbsp; ad.<span style="color: #006633;">setClickURL</span><span style="color: #009900;">&#40;</span>XML.<span style="color: #006633;">getAttributeValue</span><span style="color: #009900;">&#40;</span>doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;target&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//TRACKING PIXEL URLs = the BEACONs as they are named in SMAATO network</span><br />
&nbsp; &nbsp; &nbsp; NodeList nl <span style="color: #339933;">=</span> doc.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;beacon&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> nl.<span style="color: #006633;">getLength</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> trackingPx <span style="color: #339933;">=</span> XML.<span style="color: #006633;">getTextFromNode</span><span style="color: #009900;">&#40;</span>nl.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ad.<span style="color: #006633;">addTrackingPixelURL</span><span style="color: #009900;">&#40;</span>trackingPx<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<h2 style="text-align: center;"><strong>Please let me know in the comments if you find this useful!</strong></h2>
<h2 style="text-align: center;"><strong><br />
</strong></h2>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/' rel='bookmark' title='In App Advertising on BlackBerry with QuattroWireless, MillennialMedia, SMAATO and NexAge a bitter experience'>In App Advertising on BlackBerry with QuattroWireless, MillennialMedia, SMAATO and NexAge a bitter experience</a></li>
<li><a href='http://www.inteist.com/2011/02/convert-argb-to-int-value-java/' rel='bookmark' title='Convert ARGB to int value (Java)'>Convert ARGB to int value (Java)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 – how to reset emulator</title>
		<link>http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/</link>
		<comments>http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 06:29:42 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Enlightening]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=334</guid>
		<description><![CDATA[I needed recently to basically remove my app installation from the Windows Phone 7 emulator. I could not find how you can remove the app from the emulator, but I found a way to reset and force the Windows Phone 7 emulator to cold boot. You can clear the windows phone emulator state, by deleting [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/10/free-windows-phone-7-for-pdc10-attendees/' rel='bookmark' title='Free Windows Phone 7 for PDC10 attendees'>Free Windows Phone 7 for PDC10 attendees</a></li>
<li><a href='http://www.inteist.com/2011/09/windows-8-contracts-whats-the-fuss-is-all-about/' rel='bookmark' title='Windows 8 &#8220;contracts&#8221; what&#8217;s the fuss is all about'>Windows 8 &#8220;contracts&#8221; what&#8217;s the fuss is all about</a></li>
<li><a href='http://www.inteist.com/2012/01/windows-phone-wp7-stats-for-2011-infographics/' rel='bookmark' title='Windows Phone (WP7) stats for 2011 infographics'>Windows Phone (WP7) stats for 2011 infographics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F10%2Fwindows-phone-7-how-reset-clean-emulator%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F10%2Fwindows-phone-7-how-reset-clean-emulator%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Mobile,Technical,WP7&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I needed recently to basically remove my app installation from the Windows Phone 7 emulator. I could not find how you can remove the app from the emulator, but I found a way to reset and force the Windows Phone 7 emulator to cold boot.</p>
<p>You can clear the windows phone emulator state, by deleting the saved state file in:</p>
<blockquote><p>%ProgramData%\Microsoft\XDE\*.dess</p></blockquote>
<p>You can just hit the windows key on your keyboard and paste this &#8220;%ProgramData%\Microsoft\XDE\&#8221; and you will be taken to the right location.</p>
<p>Delete the *.dess files. This will force the emulator to reset and run the cold boot sequence.</p>
<p>Too bad, it&#8217;s not possible to do simulator reset right from the development tools. Here&#8217;s hoping that Windows Phone Tools development team will improve that situation in the future releases.</p>
<p>Please share your thought in comments.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/10/free-windows-phone-7-for-pdc10-attendees/' rel='bookmark' title='Free Windows Phone 7 for PDC10 attendees'>Free Windows Phone 7 for PDC10 attendees</a></li>
<li><a href='http://www.inteist.com/2011/09/windows-8-contracts-whats-the-fuss-is-all-about/' rel='bookmark' title='Windows 8 &#8220;contracts&#8221; what&#8217;s the fuss is all about'>Windows 8 &#8220;contracts&#8221; what&#8217;s the fuss is all about</a></li>
<li><a href='http://www.inteist.com/2012/01/windows-phone-wp7-stats-for-2011-infographics/' rel='bookmark' title='Windows Phone (WP7) stats for 2011 infographics'>Windows Phone (WP7) stats for 2011 infographics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry Developer Conference 2010 is tomorrow</title>
		<link>http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/</link>
		<comments>http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 05:26:34 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[DevCon]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=312</guid>
		<description><![CDATA[BlackBerry Developer conference is starting tomorrow. I have arrived to San Francisco at noon today and just had a relaxing day browsing the sity, visiting the beautiful Chinatown and the Coit Tower from where you can see pretty much the whole city. It&#8217;s my second time in San Francisco, first time being here about 1.5 [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-subjective-notes-note-one/' rel='bookmark' title='BlackBerry Developer Conference &#8211; subjective notes &#8211; note one'>BlackBerry Developer Conference &#8211; subjective notes &#8211; note one</a></li>
<li><a href='http://www.inteist.com/2010/03/new-england-blackberry-developer-meetup-group-first-meetup-notes/' rel='bookmark' title='New England BlackBerry Developer Meetup group &#8211; first meetup notes'>New England BlackBerry Developer Meetup group &#8211; first meetup notes</a></li>
<li><a href='http://www.inteist.com/2010/09/is-rim-going-down/' rel='bookmark' title='Is RIM going down?'>Is RIM going down?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fblackberry-developer-conference-2010-is-tomorrow%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fblackberry-developer-conference-2010-is-tomorrow%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Blackberry,DevCon,Mobile,RIM&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>BlackBerry Developer conference is starting tomorrow. I have arrived to San Francisco at noon today and just had a relaxing day browsing the sity, visiting the beautiful Chinatown and the Coit Tower from where you can see pretty much the whole city. It&#8217;s my second time in San Francisco, first time being here about 1.5 years ago for the Google I/O 2009 (so sorry had to miss it this year&#8230;). San Francisco is an interesting city and I like it, but it is a little dirty for my snobby Bostonian taste.</p>
<p>Anyhow, this is not about the city. BBDevCon 2010 is tomorrow and I am expecting it to be a turnkey for me, it was a long time of <a href="http://www.inteist.com/2009/04/android-development-vs-blackberry-development/">love and hate relation</a> between me and BlackBerry. The platform is not evolving (yeah yeah, BB OS 6 &#8211; whatever&#8230; this is so 3 years ago) and in the super fast paced space as mobile, standing still is actually equals to moving back as everyone is innovating with the speed of light.</p>
<p>I will be looking for cues as to whether RIM will be able to at least <a href="http://www.inteist.com/2010/09/is-rim-going-down/">maintain its current user base</a> and improve his ways in treating smaller indie developers.</p>
<p>There have been rummors about BB Tablet &#8211; BlackPad, to be announced during the BB DevCon 2010. I am personally very skeptical about it, but we will see. Also &#8211; it is almost clear to everyone that RIM will announce it&#8217;s advertising API availability to the public &#8211; not great news though. They have the worst performing advertising so far, and this is one of the major points for me personally, if there is no promising (I am not even wishing for bright) future on the horizon, BlackBerry will be the last platform to receive any attention on my list.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-subjective-notes-note-one/' rel='bookmark' title='BlackBerry Developer Conference &#8211; subjective notes &#8211; note one'>BlackBerry Developer Conference &#8211; subjective notes &#8211; note one</a></li>
<li><a href='http://www.inteist.com/2010/03/new-england-blackberry-developer-meetup-group-first-meetup-notes/' rel='bookmark' title='New England BlackBerry Developer Meetup group &#8211; first meetup notes'>New England BlackBerry Developer Meetup group &#8211; first meetup notes</a></li>
<li><a href='http://www.inteist.com/2010/09/is-rim-going-down/' rel='bookmark' title='Is RIM going down?'>Is RIM going down?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is RIM going down?</title>
		<link>http://www.inteist.com/2010/09/is-rim-going-down/</link>
		<comments>http://www.inteist.com/2010/09/is-rim-going-down/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 19:49:12 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Ranting]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=285</guid>
		<description><![CDATA[For the last several month I&#8217;ve been thinking about the future of developing for BlackBerry and whether it even makes sense to bet on the BlackBerry OS. The learning curve for BlackBerry development is very steep, which makes it a huge hurdle for the newcomers to the platform, but works for the advantage of the [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2009/04/android-development-vs-blackberry-development/' rel='bookmark' title='Android development vs. Blackberry Development'>Android development vs. Blackberry Development</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
<li><a href='http://www.inteist.com/2010/11/android-vs-iphone-vs-blackberry-users/' rel='bookmark' title='Android vs. iPhone vs. BlackBerry Users'>Android vs. iPhone vs. BlackBerry Users</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/09/is-rim-going-down/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/09/is-rim-going-down/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fis-rim-going-down%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fis-rim-going-down%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Android,Blackberry,Mobile,RIM&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>For the last several month I&#8217;ve been thinking about the future of developing for BlackBerry and whether it even makes sense to bet on the BlackBerry OS. The learning curve for BlackBerry development is very steep, which makes it a huge hurdle for the newcomers to the platform, but works for the advantage of the companies and developers who already took the plunge and were swimming the quirky waters of BlackBerry OS for some time.</p>
<p><span id="more-285"></span>So basically what I am saying is that for existing BlackBerry developers is it a very sweet spot to be in <strong>if</strong> BlackBerry OS is to there to stay. With less than 10 thousand apps on the app world compared to more than 150 thousand on Android and more than 250 thousand on iPhone, there is a good chance your app will get noticed and get traction; especially if your app is somewhat polished since many of the apps on BlackBerry at the moment look absolutely horrible.  But the if I mentioned earlier about BlackBerry staying in the game, at least long enough for developers to rip any benefits <strong>in indeed one big if</strong>.</p>
<p><strong>Is RIM in trouble? </strong>Yes, I think it certainly is.</p>
<p>My contemplations began a long ago and I keep finding more and more reinforcements to this as time goes by, or maybe just more and more people are starting to realize it now as the <a href="http://www.businessinsider.com/rim-earnings-preview-now-rim-needs-to-explain-why-the-blackberry-isnt-screwed-2010-9" target="_blank">revenues of RIM are plummeting</a> and the market share is shrinking instead of growing with the overall growth of the smartphone market share. It surely does not look good anyway you look at it.</p>
<p>The upcoming BlackBerry developer conference seem to be struggling to find audience as well, as I have been getting tons of emails with more and more steep discounted registration fees, to the extent when it seems they will soon start actually paying people to attend.</p>
<p>A <a href="http://www.businessinsider.com/rim-android-blackberry-2010-8" target="_blank">recent find</a> to the collection was this article on business insider about how noone gives a damn about BlackBerry OS:</p>
<ul>
<li><strong>No one who buys BlackBerry products actually cares about the BlackBerry OS.</strong></li>
</ul>
<ul>
<li><strong>RIM&#8217;s greatest assets are its email service (on BlackBerry phones and back-end server setup), BlackBerry Messenger, and the BlackBerry brand. </strong>These could all be moved over to Android, and none of them relies on the BlackBerry OS.</li>
</ul>
<ul>
<li><strong>RIM&#8217;s mobile app platform is garbage compared to Apple&#8217;s or even Google&#8217;s.</strong> An Android BlackBerry would be able to take advantage of the fast-growing Android app platform, and RIM wouldn&#8217;t have to waste any money nurturing it.</li>
</ul>
<ul>
<li><strong>RIM still has good relationships with most carriers.</strong> So an Android-based BlackBerry could receive top billing from carriers, versus rival Android devices from Motorola, HTC, Samsung, and others.</li>
</ul>
<ul>
<li><strong>If RIM joined the Android camp, it would be a HUGE boost for Android, and a big problem for Apple, which would lose even more platform share to Android.</strong> Developers might seriously have to start thinking about Android first, and Apple&#8217;s iOS second. (There are still some major problems with Android&#8217;s app market, but those can be worked out.)</li>
</ul>
<ul>
<li><strong>For illustration, if RIM were an Android vendor in Q2, Android would have had 35% of the world&#8217;s smartphone market, per IDC, versus Apple&#8217;s 14%. </strong>Instead, RIM had 18% &#8212; down from last year &#8212; and Android had 17% &#8212; up huge from last year.</li>
</ul>
<ul>
<li><strong>Doesn&#8217;t a BlackBerry Droid sound sexy to you?</strong></li>
</ul>
<p>The article may come as a joke to some, but if you think about it and you know <a href="http://www.inteist.com/2009/04/android-development-vs-blackberry-development/">realities of development on different platforms</a>, this actually starts to make a lot of sense.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2009/04/android-development-vs-blackberry-development/' rel='bookmark' title='Android development vs. Blackberry Development'>Android development vs. Blackberry Development</a></li>
<li><a href='http://www.inteist.com/2010/09/blackberry-developer-conference-2010-is-tomorrow/' rel='bookmark' title='BlackBerry Developer Conference 2010 is tomorrow'>BlackBerry Developer Conference 2010 is tomorrow</a></li>
<li><a href='http://www.inteist.com/2010/11/android-vs-iphone-vs-blackberry-users/' rel='bookmark' title='Android vs. iPhone vs. BlackBerry Users'>Android vs. iPhone vs. BlackBerry Users</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/09/is-rim-going-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load cod file to BlackBerry using JavaLoader</title>
		<link>http://www.inteist.com/2010/09/load-cod-file-to-blackberry-using-javaloader/</link>
		<comments>http://www.inteist.com/2010/09/load-cod-file-to-blackberry-using-javaloader/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 17:42:37 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=270</guid>
		<description><![CDATA[It is simple to load a BlackBerry application packaged as cod file to your device using JavaLoader.exe. With JavaLoader, you do not have to install the desktop manager if you just want to have an ability to quickly load applications to your blackberry Connect your BlackBerry to your computer through USB Open command prompt and [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2009/08/blackberry-development-with-eclipse-plugin-fixing-corrupted-jdp-file/' rel='bookmark' title='BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file'>BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file</a></li>
<li><a href='http://www.inteist.com/2010/03/new-england-blackberry-developer-meetup-group-first-meetup-notes/' rel='bookmark' title='New England BlackBerry Developer Meetup group &#8211; first meetup notes'>New England BlackBerry Developer Meetup group &#8211; first meetup notes</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/' rel='bookmark' title='BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems'>BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/09/load-cod-file-to-blackberry-using-javaloader/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/09/load-cod-file-to-blackberry-using-javaloader/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fload-cod-file-to-blackberry-using-javaloader%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F09%2Fload-cod-file-to-blackberry-using-javaloader%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Blackberry,Mobile,Technical&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>It is simple to load a BlackBerry application packaged as cod file to your device using JavaLoader.exe. With JavaLoader, you do not have to install the desktop manager if you just want to have an ability to quickly load applications to your blackberry</p>
<ol>
<li>Connect your BlackBerry to your computer through USB</li>
<li>Open command prompt and navigate to the location of JavaLoader.exe</li>
<li>Run &#8220;<em>JavaLoader.exe -u=USB load path_to_your_cod_file</em>&#8221; command and you should be all set</li>
</ol>
<p>It is easier if you have the JavaLoader and the COD files in the same dir because then the command is simply</p>
<pre>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">JavaLoader.exe <span style="color: #660033;">-u</span>=USB load path_to_your_cod_file</div></div>
</pre>
<p><strong>UPDATE: </strong>The JavaLoader command will not work if you don&#8217;t have the BlackBerry desktop manager installed. You will get an error that the port can not be open.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2009/08/blackberry-development-with-eclipse-plugin-fixing-corrupted-jdp-file/' rel='bookmark' title='BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file'>BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file</a></li>
<li><a href='http://www.inteist.com/2010/03/new-england-blackberry-developer-meetup-group-first-meetup-notes/' rel='bookmark' title='New England BlackBerry Developer Meetup group &#8211; first meetup notes'>New England BlackBerry Developer Meetup group &#8211; first meetup notes</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/' rel='bookmark' title='BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems'>BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/09/load-cod-file-to-blackberry-using-javaloader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Motorola Droid driver for Windows 7 64 bit</title>
		<link>http://www.inteist.com/2010/05/motorola-droid-driver-for-windows-7-64-bit/</link>
		<comments>http://www.inteist.com/2010/05/motorola-droid-driver-for-windows-7-64-bit/#comments</comments>
		<pubDate>Sun, 23 May 2010 18:58:34 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Droid]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=237</guid>
		<description><![CDATA[I&#8217;ve got the Motorola Droid from Google through their device seeding program a while ago. Which is nice although Nexus One would be much better since then I would have been actually using as my phone. The Droid has to be tied to Verizon and I am a T-Mobile lad all the way. Anyways, I&#8217;ve [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/' rel='bookmark' title='Windows Phone 7 – how to reset emulator'>Windows Phone 7 – how to reset emulator</a></li>
<li><a href='http://www.inteist.com/2010/09/is-rim-going-down/' rel='bookmark' title='Is RIM going down?'>Is RIM going down?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/05/motorola-droid-driver-for-windows-7-64-bit/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/05/motorola-droid-driver-for-windows-7-64-bit/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F05%2Fmotorola-droid-driver-for-windows-7-64-bit%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F05%2Fmotorola-droid-driver-for-windows-7-64-bit%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Android,Driver,Droid,Mobile,Technical,USB&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve got the Motorola Droid from Google through their device seeding program a while ago. Which is nice although Nexus One would be much better since then I would have been actually using as my phone. The Droid has to be tied to Verizon and I am a T-Mobile lad all the way.</p>
<p>Anyways, I&#8217;ve tried a few times to get adb debugging talk to my Droid on my Win7 64 bit and I could not get it to work for a long long time. I tried to search around for the solution, but none of the drivers that I&#8217;ve found worked until today I started the search again and found the Win7 64 bit Droid drivers from Motorola <a href="http://developer.motorola.com/docstools/USB_Drivers/Handset_USB_Driver_64/" target="_blank">here</a> which worked perfectly fine!</p>
<p>Don&#8217;t forget to go to &#8220;Settings-&gt;Applications-&gt;Development&#8221; and enable &#8220;USB Debugging&#8221;</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/10/windows-phone-7-how-reset-clean-emulator/' rel='bookmark' title='Windows Phone 7 – how to reset emulator'>Windows Phone 7 – how to reset emulator</a></li>
<li><a href='http://www.inteist.com/2010/09/is-rim-going-down/' rel='bookmark' title='Is RIM going down?'>Is RIM going down?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/05/motorola-droid-driver-for-windows-7-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry Eclipse plugin 1.1 will fix some of the annoying problems</title>
		<link>http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/</link>
		<comments>http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 03:20:59 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.inteism.com/?p=203</guid>
		<description><![CDATA[The next version of the BlackBerry Eclipse plugin will fix most of the . Some of the most important things are: 1) No need to restart emulator for new build to be loaded to the emulator (Hallelujah!!!) The new build should be just loaded onto the already started simulator, pretty much as on Android and [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2009/08/blackberry-development-with-eclipse-plugin-fixing-corrupted-jdp-file/' rel='bookmark' title='BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file'>BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file</a></li>
<li><a href='http://www.inteist.com/2011/12/installing-updating-blackberry-eclipse-sdk-problem-with-authentication/' rel='bookmark' title='Installing/Updating BlackBerry Eclipse SDK &#8211; problem with authentication'>Installing/Updating BlackBerry Eclipse SDK &#8211; problem with authentication</a></li>
<li><a href='http://www.inteist.com/2010/01/problems-running-blackberry-simulator-fledge-on-windows-7-64-bit/' rel='bookmark' title='Problems running BlackBerry Simulator (fledge) on Windows 7 64 bit'>Problems running BlackBerry Simulator (fledge) on Windows 7 64 bit</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div align="right" style="float: right; padding: 0px 0px 5px 5px;"><a name="fb_share" type="box_count" share_url="http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/"></a></div><div class="google_plus_one" style="float: right; margin-left: 10px;"><g:plusone size="standard" count="false" url="http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/"></g:plusone></div><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F03%2Fblackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F03%2Fblackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Blackberry,Eclipse,Mobile,Technical&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The next version of the BlackBerry Eclipse plugin will fix most of the <a href="http://www.inteist.com/2009/04/android-development-vs-blackberry-development/">annoying things about blackberry development</a>.</p>
<p>Some of the most important things are:<strong></strong></p>
<p><strong>1) No need to restart emulator for new build to be loaded to the emulator (Hallelujah!!!)</strong></p>
<p>The<strong> </strong>new build should be just loaded onto the already started simulator, pretty much as on Android and iPhone.</p>
<p><strong>2) Ability to add external libraries i.e. <em>*.jar</em> files to the project</strong></p>
<p>This is actually pretty peculiar since RIM was pushing hard 3-d party (external library) integration as one of important concepts and obviously it would be very beneficial for the BlackBerry ecosystem but if you did not want to use JDE, there was pretty much no clean way to add external library. That is until the 1.1 plugin comes out from beta, or at least that what was promised at the <a href="http://www.inteist.com/2010/03/new-england-blackberry-developer-meetup-group-first-meetup-notes/">New England BlackBerry developers meetup</a>.</p>
<p><strong>3) The BlackBerry plugin would follow the &#8220;Eclipse way&#8221;</strong></p>
<p>The 1.1 plugin is very different from previous version. Instead of following the &#8220;JDE way&#8221; it will be much more the natural &#8220;Eclipse way&#8221;. This is both good and bad. This is very good for developers that have experience with Eclipse and just now start to develop for BlackBerry. This will however be somewhat painful for the seasoned developers who got used to the old plugin and will need to discover many things from scratch. (I personally felt quite lost with the new 1.1 plugin and decided to stick with the old one until 1.1 comes out of beta).</p>
<p>You can download the beta of 1.1 from <a href="http://na.blackberry.com/eng/developers/devbetasoftware/javaplugin.jsp" target="_blank">here</a> (you would need to have BlackBerry developer account which is <strong>free</strong> and can be obtained with simple sign up immediately)</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2009/08/blackberry-development-with-eclipse-plugin-fixing-corrupted-jdp-file/' rel='bookmark' title='BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file'>BlackBerry development with Eclipse plugin – fixing corrupted *.jdp file</a></li>
<li><a href='http://www.inteist.com/2011/12/installing-updating-blackberry-eclipse-sdk-problem-with-authentication/' rel='bookmark' title='Installing/Updating BlackBerry Eclipse SDK &#8211; problem with authentication'>Installing/Updating BlackBerry Eclipse SDK &#8211; problem with authentication</a></li>
<li><a href='http://www.inteist.com/2010/01/problems-running-blackberry-simulator-fledge-on-windows-7-64-bit/' rel='bookmark' title='Problems running BlackBerry Simulator (fledge) on Windows 7 64 bit'>Problems running BlackBerry Simulator (fledge) on Windows 7 64 bit</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/03/blackberry-eclipse-plugin-1-1-will-fix-some-of-the-annoying-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

