<?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/category/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 January 2012</title>
		<link>http://www.inteist.com/2012/01/blackberry-os-distribution-january-2012/</link>
		<comments>http://www.inteist.com/2012/01/blackberry-os-distribution-january-2012/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 21:20:47 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[BBOS]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=637</guid>
		<description><![CDATA[Last year I&#8217;ve put some stats for BB OS distribution here: Beginning 2012 I was wondering what is the OS distribution now with the BB OS 7.0 devices in the wild and especially since I wanted to do updates only for the devices running BB OS 5.0 and up. So the distribution looks like this: [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/' rel='bookmark' title='BlackBerry OS distribution March/April 2011'>BlackBerry OS distribution March/April 2011</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>
</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/blackberry-os-distribution-january-2012/"></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/blackberry-os-distribution-january-2012/"></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%2Fblackberry-os-distribution-january-2012%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F01%2Fblackberry-os-distribution-january-2012%2F&amp;source=inteist&amp;style=normal&amp;hashtags=BBOS,Blackberry,RIM&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Last year I&#8217;ve put some stats for BB OS distribution here: <a href="http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/">BlackBerry OS distribution March/April 2011</a></p>
<p>Beginning 2012 I was wondering what is the OS distribution now with the BB OS 7.0 devices in the wild and especially since I wanted to do updates only for the devices running BB OS 5.0 and up.</p>
<p>So the distribution looks like this:</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2012/01/BB-OS-distribution.jpg" rel="lightbox[637]"><img class="aligncenter size-full wp-image-639" title="BB-OS-distribution" src="http://www.inteist.com/wp-content/uploads/2012/01/BB-OS-distribution.jpg" alt="" width="389" height="343" /></a></p>
<p>Making devices that run OS below 5.0 to be about 5-6% of all the devices. Of course this data is based on the users who use this specific app, but I am almost positive that this is pretty close to the generalized numbers.</p>
<p>The numbers look like this:<br />
<a href="http://www.inteist.com/wp-content/uploads/2012/01/BB-OS-distribution-by-numbers.png" rel="lightbox[637]"><img src="http://www.inteist.com/wp-content/uploads/2012/01/BB-OS-distribution-by-numbers.png" alt="" title="BB-OS-distribution-by-numbers" width="622" height="331" class="aligncenter size-full wp-image-640" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2011/04/blackberry-os-distribution-marchapril-2011/' rel='bookmark' title='BlackBerry OS distribution March/April 2011'>BlackBerry OS distribution March/April 2011</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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2012/01/blackberry-os-distribution-january-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS vs. Android vs. BlackBerry vs. Windows Phones</title>
		<link>http://www.inteist.com/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/</link>
		<comments>http://www.inteist.com/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 15:40:59 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=629</guid>
		<description><![CDATA[Here&#8217;s the chart of smartphones market share according to market research firm NPD Quite interesting trend can be seen by the end of the year with huge spike in iOS sales. This of course can be attributed to the iPhone 4S and the holiday season. Apple products are still considered luxury and make great gifts [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/developers-can-see-the-device-and-app-version-on-each-comment-on-android-market/' rel='bookmark' title='Developers can see the device and app version on each comment on Android Market'>Developers can see the device and app version on each comment on Android Market</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>
<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/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/"></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/ios-vs-android-vs-blackberry-vs-windows-phones/"></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%2Fios-vs-android-vs-blackberry-vs-windows-phones%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2012%2F01%2Fios-vs-android-vs-blackberry-vs-windows-phones%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Android,Blackberry,iPhone,WP7&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Here&#8217;s the chart of smartphones market share according to market research firm <a href="http://www.npd.com">NPD</a></p>
<p>Quite interesting trend can be seen by the end of the year with huge spike in iOS sales. This of course can be attributed to the iPhone 4S and the holiday season. Apple products are still considered luxury and make great gifts as opposed to say Android which is considered more of a necessity.</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2012/01/iOS-vs.-Android-vs.-BlackBerry-vs.-Windows-Phones.png" rel="lightbox[629]"><img src="http://www.inteist.com/wp-content/uploads/2012/01/iOS-vs.-Android-vs.-BlackBerry-vs.-Windows-Phones.png" alt="" title="iOS vs. Android vs. BlackBerry vs. Windows Phones" width="617" height="366" class="aligncenter size-full wp-image-630" /></a></p>
<p><strong>UPDATE:</strong><br />
Additional source (showing the same trend though) from <a href="http://blog.nielsen.com/nielsenwire/consumer/more-us-consumers-choosing-smartphones-as-apple-closes-the-gap-on-android/">Nielsen</a><br />
***Note the shift in timeline. Otherwise the graphs correlate.</p>
<p><a href="http://www.inteist.com/wp-content/uploads/2012/01/iOS-vs.-Android-vs.-BlackBerry-2011-Nielsen.png" rel="lightbox[629]"><img src="http://www.inteist.com/wp-content/uploads/2012/01/iOS-vs.-Android-vs.-BlackBerry-2011-Nielsen.png" alt="" title="iOS vs. Android vs. BlackBerry 2011 Nielsen" width="557" height="452" class="aligncenter size-full wp-image-633" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/developers-can-see-the-device-and-app-version-on-each-comment-on-android-market/' rel='bookmark' title='Developers can see the device and app version on each comment on Android Market'>Developers can see the device and app version on each comment on Android Market</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>
<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/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The power of SnapDragon processor with Adreno GPU</title>
		<link>http://www.inteist.com/2011/10/the-power-of-snapdragon-processor-with-adreno-gpu/</link>
		<comments>http://www.inteist.com/2011/10/the-power-of-snapdragon-processor-with-adreno-gpu/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 15:30:18 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Enlightening]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone 4S]]></category>
		<category><![CDATA[SnapDragon]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=579</guid>
		<description><![CDATA[Very energizing and inspiring video about Qualcomm&#8217;s Snapdragon processor with the Adreno GPU. Wide deployment of the SnapDragon processors (including in the new iPhone 4S) makes it so more attractive to develop for. If you are a game developer watch the video and get inspired! Click to view in the full post View More Qualcomm [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2009/06/will-windows-eventually-loose-portables-war-thanks-to-many-arm-powered-netbooks-coming/' rel='bookmark' title='Will Windows eventually loose portables war thanks to many ARM powered netbooks coming?'>Will Windows eventually loose portables war thanks to many ARM powered netbooks coming?</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/10/the-power-of-snapdragon-processor-with-adreno-gpu/"></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/10/the-power-of-snapdragon-processor-with-adreno-gpu/"></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%2F10%2Fthe-power-of-snapdragon-processor-with-adreno-gpu%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2011%2F10%2Fthe-power-of-snapdragon-processor-with-adreno-gpu%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Android,iPhone+4S,SnapDragon&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Very energizing and inspiring video about Qualcomm&#8217;s Snapdragon processor with the Adreno GPU. Wide deployment of the SnapDragon processors (<strong>including in the new iPhone 4S</strong>) makes it so more attractive to develop for.</p>
<p>If you are a game developer watch the video and get inspired!</p>
<p>Click to view in the full post</p>
<p><span id="more-579"></span></p>
<div style="font-family: verdana; font-size: 11px;"><object width="500" height="300" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="xmlPath=http://www.qualcomm.com/feeds/video/19192/detail.xml&amp;mode=embedded&amp;swfPath=http://www.qualcomm.com/sites/all/themes/qualcomm/swfs/&amp;disable_title=false&amp;disable_share=true&amp;disable_send=true&amp;primary=7810710&amp;secondary=3712950&amp;disable_rating=false&amp;send_mailto=true&amp;simple_endScreen=false&amp;simple_infoPanel=false&amp;disable_embed=false&amp;disable_embedViewMore=false&amp;auto_play=true" /><param name="src" value="http://www.qualcomm.com/sites/all/themes/qualcomm/swfs/player.swf?xmlPath=http://www.qualcomm.com/feeds/video/19192/detail.xml&amp;mode=embedded&amp;swfPath=http://www.qualcomm.com/sites/all/themes/qualcomm/swfs&amp;disable_title=false&amp;disable_share=true&amp;disable_send=true&amp;primary=7810710&amp;secondary=3712950&amp;disable_rating=false&amp;send_mailto=true&amp;simple_endScreen=false&amp;simple_infoPanel=false&amp;disable_embed=false&amp;disable_embedViewMore=false&amp;auto_play=true" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="scale" value="noscale" /><embed width="500" height="300" type="application/x-shockwave-flash" src="http://www.qualcomm.com/sites/all/themes/qualcomm/swfs/player.swf?xmlPath=http://www.qualcomm.com/feeds/video/19192/detail.xml&amp;mode=embedded&amp;swfPath=http://www.qualcomm.com/sites/all/themes/qualcomm/swfs&amp;disable_title=false&amp;disable_share=true&amp;disable_send=true&amp;primary=7810710&amp;secondary=3712950&amp;disable_rating=false&amp;send_mailto=true&amp;simple_endScreen=false&amp;simple_infoPanel=false&amp;disable_embed=false&amp;disable_embedViewMore=false&amp;auto_play=true" allowScriptAccess="always" wmode="transparent" allowFullScreen="true" flashvars="xmlPath=http://www.qualcomm.com/feeds/video/19192/detail.xml&amp;mode=embedded&amp;swfPath=http://www.qualcomm.com/sites/all/themes/qualcomm/swfs/&amp;disable_title=false&amp;disable_share=true&amp;disable_send=true&amp;primary=7810710&amp;secondary=3712950&amp;disable_rating=false&amp;send_mailto=true&amp;simple_endScreen=false&amp;simple_infoPanel=false&amp;disable_embed=false&amp;disable_embedViewMore=false&amp;auto_play=true" allowfullscreen="true" allowscriptaccess="always" scale="noscale" /></object></p>
<div style="text-align: center; width: 650px;"><a style="text-decoration: none;" href="http://www.qualcomm.com/videos">View More Qualcomm Videos</a></div>
</div>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2009/06/will-windows-eventually-loose-portables-war-thanks-to-many-arm-powered-netbooks-coming/' rel='bookmark' title='Will Windows eventually loose portables war thanks to many ARM powered netbooks coming?'>Will Windows eventually loose portables war thanks to many ARM powered netbooks coming?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2011/10/the-power-of-snapdragon-processor-with-adreno-gpu/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>Android 2.4 codenamed Ice Cream is expected this summer. What&#8217;s next?</title>
		<link>http://www.inteist.com/2011/01/android-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next/</link>
		<comments>http://www.inteist.com/2011/01/android-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 05:34:50 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=474</guid>
		<description><![CDATA[The rumors have it that Android 2.4 codenamed Ice Cream is expected this summer in June-July and the release will be announced at the Google/IO. What&#8217;s next in store for Android releases? Will the next release going to be named &#8220;Jello&#8221; or maybe &#8220;Jam&#8221;? I personally vote for &#8220;Jello&#8221; Related posts: Developers can see the device [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/developers-can-see-the-device-and-app-version-on-each-comment-on-android-market/' rel='bookmark' title='Developers can see the device and app version on each comment on Android Market'>Developers can see the device and app version on each comment on Android Market</a></li>
<li><a href='http://www.inteist.com/2010/12/android-2-3-cant-find-my-adb/' rel='bookmark' title='Android – Can’t find my ADB'>Android – Can’t find my ADB</a></li>
<li><a href='http://www.inteist.com/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/' rel='bookmark' title='iOS vs. Android vs. BlackBerry vs. Windows Phones'>iOS vs. Android vs. BlackBerry vs. Windows Phones</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/01/android-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next/"></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/01/android-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next/"></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%2F01%2Fandroid-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2011%2F01%2Fandroid-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Android&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The rumors have it that Android 2.4 codenamed Ice Cream is expected this summer in June-July and the release will be announced at the Google/IO.</p>
<p>What&#8217;s next in store for Android releases? Will the next release going to be named &#8220;Jello&#8221; or maybe &#8220;Jam&#8221;? I personally vote for <strong>&#8220;Jello&#8221;</strong></p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2012/01/developers-can-see-the-device-and-app-version-on-each-comment-on-android-market/' rel='bookmark' title='Developers can see the device and app version on each comment on Android Market'>Developers can see the device and app version on each comment on Android Market</a></li>
<li><a href='http://www.inteist.com/2010/12/android-2-3-cant-find-my-adb/' rel='bookmark' title='Android – Can’t find my ADB'>Android – Can’t find my ADB</a></li>
<li><a href='http://www.inteist.com/2012/01/ios-vs-android-vs-blackberry-vs-windows-phones/' rel='bookmark' title='iOS vs. Android vs. BlackBerry vs. Windows Phones'>iOS vs. Android vs. BlackBerry vs. Windows Phones</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2011/01/android-2-4-codenamed-ice-cream-is-expected-this-summer-whats-next/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>In App Advertising on BlackBerry with QuattroWireless, MillennialMedia, SMAATO and NexAge a bitter experience</title>
		<link>http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/</link>
		<comments>http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 04:41:01 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Ranting]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=434</guid>
		<description><![CDATA[Preface At some point in the past I was trying to monetize free application on BlackBerry and since most of the advertising networks that actually work with BlackBerry don&#8217;t have an SDK, I had to work with their WEB APIs directly. This did not work for me at all (with minor exception for Quattro Wireless). [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/' rel='bookmark' title='Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs'>Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs</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/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/"></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/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/"></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%2Fin-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F12%2Fin-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience%2F&amp;source=inteist&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h2>Preface</h2>
<p>At some point in the past I was trying to monetize free application on BlackBerry and since most of the advertising networks that actually work with BlackBerry don&#8217;t have an SDK, I had to work with their WEB APIs directly.</p>
<p>This did not work for me at all (with minor exception for Quattro Wireless). Maybe this was personal to me, I don&#8217;t know, probably not. The monetization through advertising on BlackBerry is unfortunately does not work. I am talking from a lot of experience supporting free applications with ads on Android and iOS.</p>
<p>I&#8217;ve spent a lot of time looking for advertising agencies working with BlackBerry and then signing up and then getting the necessary information from them and then working through their documentation to implement a custom web client to pull the info from their web APIs &#8211; all this to learn once again that<strong> the revenue I could get is a </strong><strong>joke</strong>.</p>
<h2>Quattro Wireless</h2>
<p>Advertising with Quattro Wireless actually turned out to be the best BlackBerry advertising experience I had so far&#8230; As long as it lasted (not very long unfortunately).</p>
<p>Starting Sept. 30 1020 Quattro is iAd exclusive and stopped serving any ads to BlackBerry. Since I do not ever trust what I can get from advertising service, when the service stopped, the application was not impacted but other developers that were less careful (something you should not ever do though) might have had some problems.</p>
<h2>NexAge</h2>
<p>NexAge left me with<strong> the</strong> <strong>worst</strong> <strong>impression </strong>of all. First these guys at NexAge took a hell lot of my time with manual sign up and many  many phone calls I had to have with them to get anywhere. It looked very suspicious to me that they can&#8217;t implement an automatic sign up and to actually sign up for the service you had to talk to them over the phone. I should have known better at this point. Coupled with their awfully looking website, this fact should have stopped me from moving forward with them and saving a lot of my time and frustration. But since there were not many options at a time, I decided to try them out. The interesting part is that when I voiced my concerns about the manual sign-up to some higher up developer relations manager, he told me &#8220;We are the BMW of advertising, we give you a personalized and best service out there&#8221;&#8230; yeah&#8230; right&#8230;  After signing up with them and integrating their code (there were a few hiccups on the way but nothing deal breaking) I started to serve their advertisements and the results were &#8211; well&#8230; simply put horrible. When I talked to them they were not really helpful and they kept saying &#8220;we will investigate and will try to optimize&#8221;. I wonder if they are optimizing the ads manually as the sign-up. After couple weeks of my pilot with them, during which I wrote them and called them to complain about the ridiculousness of the revenue with not much results (they mostly simply ignored me) I shut them down and decided to forget about them and about the partial revenue I have generated in these couple weeks for the sake of my own mental health. I have to point out that they did have an SDK &#8211; a ridiculously large SDK, so I decided that I can not add an SDK which is almost as much as half of my whole application size, especially while I can implement the same thing with couple classes.</p>
<h2>SMAATO</h2>
<p>With <strong>SMAATO</strong> everything was much simpler, but the revenue was as bad if not worse as with NexAge. After trying them for some time and not seeing any improvement, I gave up on them.</p>
<h2>MillennialMedia</h2>
<p>With Millenial, it was more complicated. At some point I was simply furious with them and if there were any other options to advertise on BlackBerry, I would definitely avoid them, but since there aren&#8217;t I still work with them in a very limited capacity. I was so so sorry to learn that they are going to handle the technology side of RIM&#8217;s advertising service. The reason is simple &#8211; they are SUPER unorganized. And coupled with RIM, they just doubled the amount of mess. For example, they say you are ready to serve ads and you are fully operational and you publish your app and then you see some super weird stats and you ask them and they tell you some BS and then you wait a little more and then you ask again and then a few weeks later they say &#8211; &#8220;Ohh the ads you were serving are test ads&#8221;. To make things even worse &#8211; this happened to me more than once.</p>
<h2>Summary</h2>
<p>In summary, unfortunately, if you want to monetize your free application on BlackBerry &#8211; you better prepare yourself for the worst. I was hoping the official RIM advertising service will solve this problem, but unfortunately it didn&#8217;t. It&#8217;s a complete mess, as I mentioned and I don&#8217;t think they are going to sort this out any time soon. If you are a developer that knows of a better service &#8211; please let me know, I would appreciate it. Hopefully my experience also helps you to save some of your time. If you are eager to try anyway, I plan to post the custom integration code that I wrote here so that you (again) can save some time reusing this code.</p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/12/java-code-to-work-with-millennialmedia-smaato-and-nexage-web-advertising-apis/' rel='bookmark' title='Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs'>Java code to work with MillennialMedia, SMAATO and NexAge web advertising APIs</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/12/in-app-advertising-on-blackberry-with-quattrowireless-millennialmedia-smaato-and-nexage-a-bitter-experience/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BlackBerry PlayBook vs. Apple iPad &#8211; browser comparison</title>
		<link>http://www.inteist.com/2010/11/blackberry-playbook-vs-apple-ipad-browser-comparison/</link>
		<comments>http://www.inteist.com/2010/11/blackberry-playbook-vs-apple-ipad-browser-comparison/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 17:26:39 +0000</pubDate>
		<dc:creator>Inteist</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[PlayBook]]></category>

		<guid isPermaLink="false">http://www.inteist.com/?p=366</guid>
		<description><![CDATA[In the following video, the web experience on the BlackBerry Playbook is compared to the web experience on the iPad. It is clearly shown (the video is made by RIM) that PlayBook significantly outperforms the iPad. While these tests are definitely subjective since they are performed by RIM, so they could choose website favorable to [...]
Related posts:<ol>
<li><a href='http://www.inteist.com/2010/05/chrome-os-and-the-ipad/' rel='bookmark' title='Chrome OS and the iPad'>Chrome OS and the iPad</a></li>
<li><a href='http://www.inteist.com/2010/09/some-notes-on-qnx-the-new-blackberry-playbook-os/' rel='bookmark' title='Some notes on QNX &#8211; the new BlackBerry PlayBook OS'>Some notes on QNX &#8211; the new BlackBerry PlayBook OS</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-upcoming-webkit-browser/' rel='bookmark' title='BlackBerry Upcoming WebKit Browser'>BlackBerry Upcoming WebKit Browser</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/11/blackberry-playbook-vs-apple-ipad-browser-comparison/"></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/11/blackberry-playbook-vs-apple-ipad-browser-comparison/"></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%2F11%2Fblackberry-playbook-vs-apple-ipad-browser-comparison%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.inteist.com%2F2010%2F11%2Fblackberry-playbook-vs-apple-ipad-browser-comparison%2F&amp;source=inteist&amp;style=normal&amp;hashtags=Apple,Blackberry,iPad,PlayBook&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In the following video, the web experience on the BlackBerry Playbook is compared to the web experience on the iPad. It is clearly shown (the video is made by RIM) that PlayBook significantly outperforms the iPad. While these tests are definitely subjective since they are performed by RIM, so they could choose website favorable to the PlayBook and otherwise objectively-subjectively give the PlayBook some edge, the interesting thing to note is that the PlayBook uses the open source WebKit browser initially developed by Apple. It is a very interesting camparo nevertheless.</p>
<p>Would be very interesting to see the Samsung Galaxy Tab running Android participate in this comparison, especially since it has the same 7&#8243; form factor as the PlayBook and it has Flash enabled of course.</p>
<p>Enjoy the video and let me know what you think!</p>
<p style="text-align: center;"><strong>Blackberry PlayBook vs. Apple iPad comparison:</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="390" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/s72rGDUn2uo&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="390" src="http://www.youtube.com/v/s72rGDUn2uo&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://www.inteist.com/2010/05/chrome-os-and-the-ipad/' rel='bookmark' title='Chrome OS and the iPad'>Chrome OS and the iPad</a></li>
<li><a href='http://www.inteist.com/2010/09/some-notes-on-qnx-the-new-blackberry-playbook-os/' rel='bookmark' title='Some notes on QNX &#8211; the new BlackBerry PlayBook OS'>Some notes on QNX &#8211; the new BlackBerry PlayBook OS</a></li>
<li><a href='http://www.inteist.com/2010/03/blackberry-upcoming-webkit-browser/' rel='bookmark' title='BlackBerry Upcoming WebKit Browser'>BlackBerry Upcoming WebKit Browser</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.inteist.com/2010/11/blackberry-playbook-vs-apple-ipad-browser-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

