<?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>Androidsx</title>
	<atom:link href="http://www.androidsx.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.androidsx.com</link>
	<description>Our Android apps and much more!</description>
	<lastBuildDate>Wed, 09 Jun 2010 20:55:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Admob vs Mobclix: 2nd round</title>
		<link>http://www.androidsx.com/admob-vs-mobclix-2nd-round/</link>
		<comments>http://www.androidsx.com/admob-vs-mobclix-2nd-round/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:55:35 +0000</pubDate>
		<dc:creator>Pablo Pera Mira</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[admob]]></category>
		<category><![CDATA[ctr]]></category>
		<category><![CDATA[ecpm]]></category>
		<category><![CDATA[experience]]></category>
		<category><![CDATA[mobclix]]></category>
		<category><![CDATA[mobile advertising]]></category>
		<category><![CDATA[publisher]]></category>
		<category><![CDATA[revenue]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=278</guid>
		<description><![CDATA[It&#8217;s been three months since we migrated to Mobclix from Admob, where we stayed for over two months. So we want to share some data, mainly focused to get our fellow developers starting out in the Android world to better estimate what kind of revenue they can make out of advertising.
We will compare the results [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been three months since we <strong>migrated to Mobclix from Admob</strong>, where we stayed for over two months. So we want to share some data, mainly focused to get our fellow developers starting out in the Android world to better estimate what kind of revenue they can make out of advertising.</p>
<p>We will compare the results for four weeks, aligned by the week day, using the data from February/March for Admob, and April/May for Mobclix.</p>
<p>This is the revenue that we generated <em>per day</em> (*):</p>

<div id="easyChartDiv500c8001" style='width:100%;'  style='text-align:center;' align='center'>
<!-- Easy Chart Builder by dyerware -->
<img id="easyChartDiv500c8001_img" style='text-align:center;float:center;' alt='dyerware' title=''  align='center' border='0' />
<br/><br/><INPUT type='button' value='Show/Hide Table Data' onclick='wpEasyChartToggle("easyChartDiv500c8001_data");' style='text-align:center;' align='center' ><br/><div class='easyChartBuilder' id="easyChartDiv500c8001_data" style='text-align:center;display:none;' align='center'></div>
</div>
<script type="text/javascript">
//<![CDATA[
wpEasyChart.wpNewChart("easyChartDiv500c8001", {"type":"line","width":"350","height":"200","title":"Revenue per day","minaxis":"","groupnames":"Admob, Mobclix","groupcolors":"0070C0,FFFF00,FF0000,00CC00,A3A3A3,007070,00FFFF,CC7000,00CC70,CC0070,7000CC,A370CC","valuenames":"M, T, W, T, F, S, S, M, T, W, T, F, S, S, M, T, W, T, F, S, S, M, T, W, T, F, S, S","group1values":"41.84, 53.16, 60.25, 57.4, 55.97, 52.64, 45.9, 44.49, 42.77, 41.08, 43.37, 53.84, 48.02, 46.09, 50.83, 48.83, 58.76, 60.78, 50.66, 49.78, 47.33, 55.82, 49.08, 52.27, 47.39, 37.07, 41.79, 37.25","group2values":"49.02697336, 31.43766279, 40.76398217, 36.22025943, 35.67023538, 49.01791154, 48.46042933, 42.14622089, 47.51736842, 45.76532417, 39.30042966, 56.80574919, 75.08018039, 75.60195672, 39.54976401, 53.27174147, 39.34490247, 34.43566317, 34.62581847, 38.03365557, 42.39968811, 32.84906296, 37.59208261, 35.65069664, 39.06469516, 52.82288317, 35.31795497, 30.87946748","group3values":"0,0,0","group4values":"0,0,0","group5values":"0,0,0","group6values":"0,0,0","group7values":"0,0,0","group8values":"0,0,0","group9values":"0,0,0","group10values":"0,0,0","group11values":"0,0,0","group12values":"0,0,0","group1markers":"","group2markers":"","group3markers":"","group4markers":"","group5markers":"","group6markers":"","group7markers":"","group8markers":"","group9markers":"","group10markers":"","group11markers":"","group12markers":"","markercolor":"FFFF00","imagealtattr":"dyerware","imagetitleattr":"","hidechartdata":false,"chartcolor":"FFFFFF","chartfadecolor":"DDDDDD","datatablecss":"hentry easyChartDataTable","imgstyle":"text-align:center;float:center;","watermark":"","watermarkvert":"","watermarkcolor":"A0BAE9","currency":"","precision":""});
//]]&gt;
</script>
<p>And here, the revenue <em>per click</em>, which is our preferred indicator to compare how different ad providers perform:</p>

<div id="easyChartDiv550a8002" style='width:100%;'  style='text-align:center;' align='center'>
<!-- Easy Chart Builder by dyerware -->
<img id="easyChartDiv550a8002_img" style='text-align:center;float:center;' alt='dyerware' title=''  align='center' border='0' />
<br/><br/><INPUT type='button' value='Show/Hide Table Data' onclick='wpEasyChartToggle("easyChartDiv550a8002_data");' style='text-align:center;' align='center' ><br/><div class='easyChartBuilder' id="easyChartDiv550a8002_data" style='text-align:center;display:none;' align='center'></div>
</div>
<script type="text/javascript">
//<![CDATA[
wpEasyChart.wpNewChart("easyChartDiv550a8002", {"type":"line","width":"350","height":"200","title":"Revenue per click","minaxis":"","groupnames":"Admob, Mobclix","groupcolors":"0070C0,FFFF00,FF0000,00CC00,A3A3A3,007070,00FFFF,CC7000,00CC70,CC0070,7000CC,A370CC","valuenames":"M, T, W, T, F, S, S, M, T, W, T, F, S, S, M, T, W, T, F, S, S, M, T, W, T, F, S, S","group1values":"0.038006974427043, 0.041969428205287, 0.041643617103958, 0.041529964127496, 0.040412017017459, 0.038445604118835, 0.034665377829691, 0.033735778210667, 0.03484700174276, 0.036940576722954, 0.037754615991603, 0.040552519247698, 0.036644749756343, 0.03768516086535, 0.041743452295622, 0.03826452372084, 0.042741019387792, 0.042461332333666, 0.039750236047189, 0.038593122943721, 0.035947299102801, 0.043941445121519, 0.04178564806456, 0.040425973412996, 0.038674485314678, 0.034595923316234, 0.034455232540412, 0.030250750386056","group2values":"0.078414862, 0.075142197, 0.075403083, 0.064992021, 0.077530235, 0.099250624, 0.092205327, 0.087558005, 0.082654917, 0.082981635, 0.081671588, 0.106029293, 0.120930307, 0.12319321, 0.081128603, 0.09285645, 0.064730798, 0.067738917, 0.06537649, 0.070207074, 0.074524998, 0.064859627, 0.072106358, 0.067114744, 0.075299014, 0.098654402, 0.071386405, 0.067539382","group3values":"0,0,0","group4values":"0,0,0","group5values":"0,0,0","group6values":"0,0,0","group7values":"0,0,0","group8values":"0,0,0","group9values":"0,0,0","group10values":"0,0,0","group11values":"0,0,0","group12values":"0,0,0","group1markers":"","group2markers":"","group3markers":"","group4markers":"","group5markers":"","group6markers":"","group7markers":"","group8markers":"","group9markers":"","group10markers":"","group11markers":"","group12markers":"","markercolor":"FFFF00","imagealtattr":"dyerware","imagetitleattr":"","hidechartdata":false,"chartcolor":"FFFFFF","chartfadecolor":"DDDDDD","datatablecss":"hentry easyChartDataTable","imgstyle":"text-align:center;float:center;","watermark":"","watermarkvert":"","watermarkcolor":"A0BAE9","currency":"","precision":""});
//]]&gt;
</script>
<p>All this has been generated by three applications, that currently have 100k active users (after over 200k downloads). It is difficult to keep track of how many users we had in each ad provider at every point in time, so comparing absolute numbers, like we did in the first graph, does not yield relevant conclusions.</p>
<p>In an upcoming article, we&#8217;ll show values that analyze the long term figures!</p>
<p>(*): We have multiplied all figures by a factor k € [0.2, 5.0], in order not to disclose our real numbers while providing meaningful data. This correction is consistent, i.e. if you have 2x active users, expect a similar price per click but double the revenue per day.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fadmob-vs-mobclix-2nd-round%2F&amp;linkname=Admob%20vs%20Mobclix%3A%202nd%20round"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/admob-vs-mobclix-1st-round/" title="Admob vs Mobclix: 1st round">Admob vs Mobclix: 1st round</a></li><li><a href="http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/" title="What does it take to develop some android applications, our experience">What does it take to develop some android applications, our experience</a></li><li><a href="http://www.androidsx.com/how-to-make-money-with-android-business-models/" title="How to make money with Android &#8211; business models">How to make money with Android &#8211; business models</a></li><li><a href="http://www.androidsx.com/6-things-weve-learned-from-the-android-market/" title="6 things we&#8217;ve learned from the Android market">6 things we&#8217;ve learned from the Android market</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/admob-vs-mobclix-2nd-round/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What does it take to develop some android applications, our experience</title>
		<link>http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/</link>
		<comments>http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/#comments</comments>
		<pubDate>Sat, 29 May 2010 10:48:55 +0000</pubDate>
		<dc:creator>Omar Pera Mira</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=268</guid>
		<description><![CDATA[The best thing for a newbie Android developer is to start a really simple project, or take a demo project and extend it. But the most important thing is to get the things done, in other words, your main objective should be to finish the idea you have been working on.
We would like to share [...]]]></description>
			<content:encoded><![CDATA[<p>The best thing for a newbie Android developer is to start a really simple project, or take a demo project and extend it. But the most important thing is to <strong>get the things done</strong>, in other words, your main objective should be to finish the idea you have been working on.</p>
<p>We would like to <strong>share the time spent in the development</strong> of some android applications., in the last months we have had <strong>development sprints releasing two games, one app, a chrome extension</strong> and some huge improvements in our already released apps. Once you have some experience with Android it is not very difficult to start a project from scratch.</p>
<p>We developed <strong><a href="http://www.androidsx.com/apps/poke-the-droid/">Poke the droid</a></strong>, a simple game similar to Whac-a-mole that test your reaction times. The main motivation was to develop our first game, assuming it will not get the success of other popular games out there. It was developed from scratch in around <strong>2 weeks</strong>.</p>
<p><a href="http://www.androidsx.com/wp-content/uploads/2010/04/in_game2.png" rel="lightbox[268]"><img src="http://www.androidsx.com/wp-content/uploads/2010/04/in_game2.png" alt="" title="in_game2" width="320" height="480" class="aligncenter size-full wp-image-226" /></a></p>
<p>Recently we released <strong><a href="http://www.androidsx.com/apps/super-stacker/">Super Stacker</a></strong>, the popular stacker game with some improvements like bonus, levels, etc. We began with Snake demo code as the base so it was not really difficult to be developed (<strong>one week</strong>), moreover we reused almost all the score system and UI from Poke the droid.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/QZOVSz7MPzE&#038;hl=es_ES&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QZOVSz7MPzE&#038;hl=es_ES&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>Another simple app we created is <strong><a href="http://www.androidsx.com/apps/spell-checker/">Spell Checker</a></strong>, this is a extremely simple application that check your words against Google system. We test the integration in a WebView of a remote web page with the Android system. It was <strong>a day of development</strong>, thanks to the Javascript library of <a href="http://orangoo.com/labs/GoogieSpell/">GoogieSpell</a>.</p>
<p><a href="http://www.androidsx.com/wp-content/uploads/2010/05/device.png" rel="lightbox[268]"><img src="http://www.androidsx.com/wp-content/uploads/2010/05/device.png" alt="" title="device" width="320" height="480" class="aligncenter size-full wp-image-261" /></a></p>
<p>On the other hand, we have made a huge refactoring in our RSS reader <strong><a href="http://www.androidsx.com/apps/anyrss-reader-widget/">Any RSS reader + widget</a></strong> (1.99 EUR). We have add the feature to open as an application, so you can access your saved feeds from the widget and from the app. <strong>It is #11 in the Top Paid of the News and Weather category, this fact has multiplied x2 the number of purchases per day.</strong></p>
<p><a href="http://www.androidsx.com/wp-content/uploads/2010/05/anyrss.png" rel="lightbox[268]"><img src="http://www.androidsx.com/wp-content/uploads/2010/05/anyrss.png" alt="" title="anyrss" width="320" height="480" class="aligncenter size-full wp-image-269" /></a></p>
<p>Finally, one of us in a boring day developed a simple extension for Chrome called <strong><a href="https://chrome.google.com/extensions/detail/enopkdddfladilcbphofmjnaiiedpckf">Android Market Link Converter</a></strong>, that converts links like<a href=" market://search?q=pname:com.androidsx.anyrss"> market://search?q=pname:com.androidsx.anyrss</a> into links to the most known Android Market clients (Cyrket, Bubiloop, etc.).</p>
<p><a href="http://www.androidsx.com/wp-content/uploads/2010/05/extension.png" rel="lightbox[268]"><img src="http://www.androidsx.com/wp-content/uploads/2010/05/extension.png" alt="" title="extension" width="600" height="426" class="aligncenter size-full wp-image-270" /></a></p>
<p>Now, we would like to make use of the <a href="http://code.google.com/intl/es-ES/android/c2dm/">Android Cloud to Device Messaging Framework</a>, but at the moment we don&#8217;t really have any interesting idea <img src='http://www.androidsx.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Do you have some fast development experiences? Share with us!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fwhat-does-it-take-to-develop-some-android-applications-our-experience%2F&amp;linkname=What%20does%20it%20take%20to%20develop%20some%20android%20applications%2C%20our%20experience"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/admob-vs-mobclix-2nd-round/" title="Admob vs Mobclix: 2nd round ">Admob vs Mobclix: 2nd round </a></li><li><a href="http://www.androidsx.com/admob-vs-mobclix-1st-round/" title="Admob vs Mobclix: 1st round">Admob vs Mobclix: 1st round</a></li><li><a href="http://www.androidsx.com/how-to-make-money-with-android-business-models/" title="How to make money with Android &#8211; business models">How to make money with Android &#8211; business models</a></li><li><a href="http://www.androidsx.com/6-things-weve-learned-from-the-android-market/" title="6 things we&#8217;ve learned from the Android market">6 things we&#8217;ve learned from the Android market</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Admob vs Mobclix: 1st round</title>
		<link>http://www.androidsx.com/admob-vs-mobclix-1st-round/</link>
		<comments>http://www.androidsx.com/admob-vs-mobclix-1st-round/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:26:09 +0000</pubDate>
		<dc:creator>Omar Pera Mira</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[admob]]></category>
		<category><![CDATA[ctr]]></category>
		<category><![CDATA[ecpm]]></category>
		<category><![CDATA[experience]]></category>
		<category><![CDATA[mobclix]]></category>
		<category><![CDATA[mobile advertising]]></category>
		<category><![CDATA[publisher]]></category>
		<category><![CDATA[revenue]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=190</guid>
		<description><![CDATA[We have been using Admob for three of our applications during two months. Our first impression was very positive: we generated way more revenue than what we expected.
The revenue per day was very unstable. In the last weeks, it went sharply down with no apparently reason (almost 30%-40%). We tried hard to understand how the [...]]]></description>
			<content:encoded><![CDATA[<p>We have been using <a href="http://www.admob.com">Admob</a> for three of our applications during two months. Our first impression was very positive: we generated way more revenue than what we expected.</p>
<p>The revenue per day was very unstable. In the last weeks, it went sharply down with no apparently reason (almost 30%-40%). We tried hard to understand how the Admob network works internally, with no happy end. <strong>We have more users, more impressions, more CTR but much less revenue&#8230;</strong> (stay tuned for an upcoming post where we share our stats).</p>
<p>After <a href="http://twitter.com/espinchi/status/10716481578">some twitter posts</a> trying to find fellow developers with whom to share experiences, we were contacted by a <a href="http://www.mobclix.com/">Mobclix</a> employee suggesting we switched to their mashup of agregated advertisement networks.</p>
<p>So, <strong>we tested Mobclix</strong> with the smallest app (in active users) with ads that we have, the <a href="http://www.androidzoom.com/android_applications/lifestyle/my-life-is-average-widget_erll.html">MLIA</a> widget:</p>
<p><a href="http://www.androidsx.com/wp-content/uploads/2010/03/mlia2.png" rel="lightbox[190]"><img class="aligncenter size-full wp-image-201" title="mlia" src="http://www.androidsx.com/wp-content/uploads/2010/03/mlia2.png" alt="" width="576" height="46" /></a></p>
<p>Here it is the <strong>comparison between Admob vs Mobclix in MLIA</strong> over the same days, it <strong>looks really promising!</strong></p>
<style>
.dataTables_wrapper {
min-height: 0 !important;
}
</style>
<h3>Admob stats</h3>

<table id="wp-table-reloaded-id-2-no-1" class="wp-table-reloaded wp-table-reloaded-id-2">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Day</th><th class="column-2">Impressions</th><th class="column-3">eCPM</th><th class="column-4">Clicks</th><th class="column-5">CTR</th><th class="column-6">Revenue</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">24-3-2010</td><td class="column-2">2867</td><td class="column-3">$0.46</td><td class="column-4">71</td><td class="column-5">2.39%</td><td class="column-6">$1.46</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">23-3-2010</td><td class="column-2">3123	</td><td class="column-3">$0.50</td><td class="column-4">91</td><td class="column-5">2.83%</td><td class="column-6">$2.93</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">22-3-2010</td><td class="column-2">4358</td><td class="column-3">$0.75</td><td class="column-4">119</td><td class="column-5">2.98%</td><td class="column-6">$2.93</td>
	</tr>
</tbody>
</table>

<h3>Moblix stats</h3>

<table id="wp-table-reloaded-id-1-no-1" class="wp-table-reloaded wp-table-reloaded-id-1">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Day</th><th class="column-2">Impressions</th><th class="column-3">eCPM</th><th class="column-4">Clicks</th><th class="column-5">CTR</th><th class="column-6">Revenue</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">24-3-2010</td><td class="column-2">3,316</td><td class="column-3">$1.81</td><td class="column-4">102</td><td class="column-5">3.08%</td><td class="column-6">$5.99</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">23-3-2010</td><td class="column-2">3,313	</td><td class="column-3">$1.53</td><td class="column-4">89</td><td class="column-5">2.69%</td><td class="column-6">$5.06	</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">22-3-2010</td><td class="column-2">2,328</td><td class="column-3">$1.54</td><td class="column-4">63</td><td class="column-5">2.71%</td><td class="column-6">$3.59</td>
	</tr>
</tbody>
</table>

<p>Still, it is very soon to draw firm conclusions. This is the start of a series of post with the comparative.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fadmob-vs-mobclix-1st-round%2F&amp;linkname=Admob%20vs%20Mobclix%3A%201st%20round"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/admob-vs-mobclix-2nd-round/" title="Admob vs Mobclix: 2nd round ">Admob vs Mobclix: 2nd round </a></li><li><a href="http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/" title="What does it take to develop some android applications, our experience">What does it take to develop some android applications, our experience</a></li><li><a href="http://www.androidsx.com/how-to-make-money-with-android-business-models/" title="How to make money with Android &#8211; business models">How to make money with Android &#8211; business models</a></li><li><a href="http://www.androidsx.com/6-things-weve-learned-from-the-android-market/" title="6 things we&#8217;ve learned from the Android market">6 things we&#8217;ve learned from the Android market</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/admob-vs-mobclix-1st-round/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>How to make money with Android &#8211; business models</title>
		<link>http://www.androidsx.com/how-to-make-money-with-android-business-models/</link>
		<comments>http://www.androidsx.com/how-to-make-money-with-android-business-models/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 12:25:15 +0000</pubDate>
		<dc:creator>Omar Pera Mira</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[android market]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=162</guid>
		<description><![CDATA[Mark Murphy has been writing really interesting posts in Android guys about the different business models around Android platform. We have chosen the most relevant ones adding some additional information:

Build the app and sell it via the Android Market
Give a free app, supported by ads (Adsense mobile, Admob, etc.)
Give a free app, sell the customizations: [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Mark Murphy" href="http://commonsware.com/mmurphy" target="_blank">Mark Murphy</a> has been writing really interesting posts in <a href="http://www.androidguys.com/ ">Android guys</a> about the different business models around Android platform. We have chosen the most relevant ones adding some additional information:</p>
<ul>
<li>Build the app and <strong>sell</strong> it via the Android Market</li>
<li>Give a free app, <strong>supported by ads</strong> (<a href="https://www.google.com/adsense/www/en_US/mobile/">Adsense mobile</a>, <a href="http://www.admob.com">Admob</a>, etc.)</li>
<li>Give a free app, <strong>sell the customizations</strong>: plugins, analytics, additional features, account (e.g. <a href="http://www.rememberthemilk.com/services/android/">RTM</a>, <a href="http://www.spotify.com/es/mobile/android/">Spotify</a>), etc.</li>
<li>Sell <strong>development tools</strong>: GUI toolkits, portability tool, &#8230;</li>
<li>Develop <strong>custom applications</strong> for others (e.g. <a href="http://droiders.com/">Droiders</a>)</li>
<li>Became a <strong>trainer</strong> of Android development</li>
<li>Specialize in <strong>porting iPhone, Windows Mobile, J2ME applications</strong> to Android.</li>
<li>Promote your ability to port some critical parts of the apps to the <strong>Android Native Development Kit</strong> (NDK)</li>
<li>Became an <strong>specialist building cross-platform apps</strong> using HTML, Javascript and CSS (e.g. PhoneGap, Titanium, Rhodes)</li>
<li>Became an expert to build apps with GPS and backend capabilities of <strong>HTML 5</strong>.</li>
<li>Build an <strong>App Generator</strong> (e.g. ePUB, RSS, audiobooks) selling this generated apps.</li>
<li>Became a specialist building <strong>Augmented Reality Layers</strong> for <a href="http://layar.com/">Layar</a> or <a href="http://www.wikitude.org/">Wikitude</a></li>
</ul>
<p>Mark has done an incredible job posting these business models, you can read the different post for more information (<a href="http://www.androidguys.com/2009/09/14/40bizmodels/">Part 1</a>, <a href="http://www.androidguys.com/2009/09/15/40-android-business-models-part-two/">2</a>, <a href="http://www.androidguys.com/2009/09/16/40-android-business-models-part-three/">3</a>, <a href="http://www.androidguys.com/2009/09/17/40-android-business-models-part-four/">4</a>, <a href="http://www.androidguys.com/2009/09/18/40-android-business-models-part-five/">5</a> and <a href="http://androidheadlines.com/2010/03/android-business-models.html">6</a>)</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fhow-to-make-money-with-android-business-models%2F&amp;linkname=How%20to%20make%20money%20with%20Android%20%26%238211%3B%20business%20models"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/6-things-weve-learned-from-the-android-market/" title="6 things we&#8217;ve learned from the Android market">6 things we&#8217;ve learned from the Android market</a></li><li><a href="http://www.androidsx.com/admob-vs-mobclix-2nd-round/" title="Admob vs Mobclix: 2nd round ">Admob vs Mobclix: 2nd round </a></li><li><a href="http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/" title="What does it take to develop some android applications, our experience">What does it take to develop some android applications, our experience</a></li><li><a href="http://www.androidsx.com/admob-vs-mobclix-1st-round/" title="Admob vs Mobclix: 1st round">Admob vs Mobclix: 1st round</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/how-to-make-money-with-android-business-models/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to write untestable code</title>
		<link>http://www.androidsx.com/how-to-write-untestable-code/</link>
		<comments>http://www.androidsx.com/how-to-write-untestable-code/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 10:08:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[software quality]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=144</guid>
		<description><![CDATA[Say that we write code for a machine that it so powerful that rumors say it could generate a black hole. We need to be serious about security: we cannot let those evil international terrorists find out our black-hole-making secrets and blow half the Milky Way Galaxy.
If they managed to access our source code, they [...]]]></description>
			<content:encoded><![CDATA[<p>Say that we write code for a machine that it so powerful that <a href="http://www.foxnews.com/story/0,2933,538447,00.html?FORM=ZZNR3">rumors say it could generate a black hole</a>. We need to be serious about security: we cannot let those evil international terrorists find out our black-hole-making secrets and blow half the Milky Way Galaxy.</p>
<p>If they managed to access our source code, they could extend it and adapt it to their cruel use case, which would represent a huge threat for the humankind. In order to reduce risks, we should write code that is difficult to understand, to maintain and of course, to test. Here&#8217;s how:</p>
<ul>
<li><strong>Depend on concrete classes</strong> &#8211; Tie things down to concrete classes &#8211; avoid interfaces wherever possible: they let people substitute the concrete classes you&#8217;re using for their own classes which would implement the same contract in the interface. By depending on concrete implementation, we make sure that they&#8217;ll have a hard time testing whether their evil plans will release enough energy to toast their breakfast bread.</li>
<li><strong>Make your own dependencies</strong> &#8211; Instantiate objects using new in the middle of methods, don&#8217;t pass the object in. Anyone that wants to test that code is forced to use that concrete object you new&#8217;ed up: they can&#8217;t inject a dummy, fake, or other mock in to simplify the behavior or make assertions about what you do to it.</li>
<li><strong>Conditional slalom</strong> &#8211; Feel good when writing lengthy if branches and switch statements. These increase the number of possible execution paths that tests will need to cover when exercising the code under test. The higher the cyclomatic complexity, the harder it is to test and understand! Why use polymorphism instead of conditionals? Don&#8217;t make it so easy! Make the branching both deep and wide: if you&#8217;re not consistently going at least 5 conditionals deep, the patient terrorists might even find out what the code intends to do under all possible combinations.
<p>It is also known as the Arrow Antipattern:</p>
<pre class="brush:xml">
if a
    if b
        if c
            foo();
        else
            bar();
        endif
    endif
endif
</pre>
<p>Refactoring into something more suitable is usually possible: </p>
<pre class="brush:xml">
if a &#038;&#038; b
    if c
        foo();
    else
        bar();
    endif
endif
</pre>
</li>
<li><strong>Use global flags</strong> &#8211; Why call a method explicitly? Set a flag in one part of your code, in order to cause an effect in a totally different part of your application. The testers will go crazy trying to figure out why all of a sudden a conditional that was evaluating true one minute is all of a sudden evaluating to false. Not to mention the mess that using that system becomes: if we manage to keep the wikis safe from their hands, they&#8217;ll have a very hard time figuring out what system properties to set in order to get the deadly weapon working.</li>
<li><strong>Loop-switch sequence</strong> &#8211; By means of which a clear set of steps is implemented as a byzantine switch-within-a-loop. Fulfilling our mission to obfuscate the code , is much more difficult to decipher the intent and actual function of the code than the more straightforward refactored solution.
<p>This is a terrorist-safe code snippet:</p>
<pre class="brush:java">
// parse a key, a value, then three parameters
String key = null;
String value = null;
final List<String> params = new LinkedList<String>();

for (int i = 0; i < 5; i++) {
  switch (i) {
    case 0: key = stream.parse(); break;
    case 1: value = stream.parse(); break;
    default: params.add(stream.parse()); break;
  }
}
</pre>
<p>While this is too easy to understand:</p>
<pre class="brush:java">
// parse a key and value
final String key = stream.parse();
final String value = stream.parse();

// parse 3 parameters
final List<String> params = new LinkedList<String>();
for (int i = 0; i < 3; i++) {
  params.add(stream.parse());
}
</pre>
</li>
</ul>
<p><em>References: <a href="http://googletesting.blogspot.com/2008/07/how-to-write-3v1l-untestable-code.html">This post</a> on the <a href="http://googletesting.blogspot.com/">Google Testing Blog</a>, the <a href="http://c2.com/cgi/wiki?ArrowAntiPattern">Arrow AntiPattern</a> in <a href="http://c2.com/">Cunningham &#038; Cunningham</a> webpage.</em></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fhow-to-write-untestable-code%2F&amp;linkname=How%20to%20write%20untestable%20code"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/dont-look-for-things-ask-for-them/" title="Don&#8217;t look for things. Ask for them!">Don&#8217;t look for things. Ask for them!</a></li><li><a href="http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/" title="Can&#8217;t test that Singleton? Try Dependency Injection!">Can&#8217;t test that Singleton? Try Dependency Injection!</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/how-to-write-untestable-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>6 things we&#8217;ve learned from the Android market</title>
		<link>http://www.androidsx.com/6-things-weve-learned-from-the-android-market/</link>
		<comments>http://www.androidsx.com/6-things-weve-learned-from-the-android-market/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 11:08:48 +0000</pubDate>
		<dc:creator>Omar Pera Mira</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[android market]]></category>
		<category><![CDATA[apps]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=85</guid>
		<description><![CDATA[We have three applications on the Android Market, AnyRSS reader widget (0.50 EUR), FML F*ck my life widget (Free) and Daily Stuff widget (Free). It makes for more than 60000 downloads, being F*ck my life the most downloaded application among them. We want to share our experience with the market for the last several months:

According [...]]]></description>
			<content:encoded><![CDATA[<p>We have three applications on the Android Market, <a title="AnyRSS reader widget" href="http://www.androidsx.com/apps/anyrss-reader-widget/" target="_self">AnyRSS reader widget</a> (0.50 EUR), <a title="FML F*ck my life widget" href="http://www.androidsx.com/apps/fml-fck-my-life-widget/" target="_self">FML F*ck my life widget</a> (Free) and <a title="Daily Stuff widget" href="http://www.androidsx.com/apps/daily-stuff-widget/" target="_self">Daily Stuff widget</a> (Free). It makes for more than 60000 downloads, being F*ck my life the most downloaded application among them. We want to share our experience with the market for the last several months:</p>
<ul>
<li>According to our <a href="http://www.flurry.com/">Flurry</a> stats, the <strong>best day to update an application</strong> is <strong>Friday morning</strong> (European afternoon or evening). On other days, such as Wednesday or Thursday, you usually get more downloads. However, other developers don&#8217;t usually release new versions in the weekends, so your application stays longer in the top of the <em>Just in</em> section.</li>
</ul>
<p><img class="aligncenter size-full wp-image-87" title="flurry" src="http://www.androidsx.com/wp-content/uploads/2009/12/flurry.png" alt="flurry" width="531" height="369" /></p>
<ul>
<li>At the moment, Android users <strong>are not accostumed to paying for an application</strong>. So, if you want to make money with your application, which strategy should you follow? Free and paid version? Free with ads? Our experience with a paid version is not quite as motivating as we expected (just a few hundreds Euros since September). Free applications with ads have more users but usually less money. The decision depends on many factors, and there&#8217;s no magical answer. We&#8217;ll probably do an experiment with our paid application, making it free application and adding some <a href="http://www.admob.com/">AdMob</a> ads (<a href="http://www.google.com/ads/mobileapps/developers.html">Google Adsense</a><strong> </strong>is only available for apps with 100K daily pageviews).</li>
<p></p>
<li>It is important to have <strong>good ratings during the first days</strong> as a new application in te market. Bad comments and ratings in the first days will make it difficult to start growing and get enough relevance to appear on relatively top places in the search results. Make sure your application is pleasant to use from the beginning: focus on reliability and stability rather than on advanced features. <strong>You do not want to annoy your first users</strong>.</li>
<p></p>
<li>Add as many <strong>relevant keywords in the description</strong> that identify your application as needed: it is too optimistic to expect people to search specifically for your application name.</li>
<p></p>
<li>Most of the users don&#8217;t care about the impact of a bad rating. If there&#8217;s any small problem, they will just throw in a bad rating/comment and uninstall the app. On the other hand, we must <strong>take care of the lovely users that suggest new features, report bugs, etc.</strong>.</li>
<p></p>
<li>Be careful with your update frequency: <strong>it is annoying for users if you update too frequently</strong>. In the Android market, <strong>each update goes to the <em>Just in</em> section</strong>, which has been really controversial in the Android world. There are many developers that abuse this by making frequent updates to get more downloads. On the other hand, getting visibility on the market through the search or the rankings is not easy, so updating is <strong>one of the best ways to gain more downloads</strong>: but with <em>real</em> updates, don&#8217;t be evil!.</li>
<p>
</ul>
<p>In other posts, we will talk about the limitations of the Android market. <strong>If we are to compete with the <a href="http://www.apple.com/iphone/apps-for-iphone/" target="_blank">App Store</a></strong>, the market should be one of the main worries for Android Core Developers and <strong>learn from its competitors</strong>. Yes, the UI is better and what not, but the visibility, the <strong><em>search</em></strong> and the average money (check <a href="http://www.locationrevolution.com/stats/SkyhookDevelopersSurveyDec2009.pdf" target="_blank">this study</a>) that you get with your applications is much lower than in the App Store. With tech companies such as Motorola investing a lot of resources in Android, <strong>there will be really powerful market competitors</strong> such as <a href="http://android-france.fr/2009/12/12/shop4apps-la-place-de-marche-dapplications-de-motorola/" target="_blank">SHOP4APPS</a> (seen in <a title="El androide libre" href="http://www.elandroidelibre.com/2009/12/filtraciones-en-motorola-opus-one-y-un.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+blogspot%2FbARA+%28Androide+Libre%29" target="_blank">El Androide libre</a>, in Spanish).</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2F6-things-weve-learned-from-the-android-market%2F&amp;linkname=6%20things%20we%26%238217%3Bve%20learned%20from%20the%20Android%20market"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/how-to-make-money-with-android-business-models/" title="How to make money with Android &#8211; business models">How to make money with Android &#8211; business models</a></li><li><a href="http://www.androidsx.com/admob-vs-mobclix-2nd-round/" title="Admob vs Mobclix: 2nd round ">Admob vs Mobclix: 2nd round </a></li><li><a href="http://www.androidsx.com/what-does-it-take-to-develop-some-android-applications-our-experience/" title="What does it take to develop some android applications, our experience">What does it take to develop some android applications, our experience</a></li><li><a href="http://www.androidsx.com/admob-vs-mobclix-1st-round/" title="Admob vs Mobclix: 1st round">Admob vs Mobclix: 1st round</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/6-things-weve-learned-from-the-android-market/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t look for things. Ask for them!</title>
		<link>http://www.androidsx.com/dont-look-for-things-ask-for-them/</link>
		<comments>http://www.androidsx.com/dont-look-for-things-ask-for-them/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 11:04:07 +0000</pubDate>
		<dc:creator>Pablo Pera Mira</dc:creator>
				<category><![CDATA[software quality]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=75</guid>
		<description><![CDATA[Before our previous article, our code to model a mechanic used to look like this:
class Mechanic {
    private final Engine engine = ServiceLocator.getCar().getEngine();
    public void fixEngine() { /* ... */ }
}

Luckily, we applied some dependency injection, resulting in nicer code: testable, and with an explicit dependency on the ServiceLocator:
class [...]]]></description>
			<content:encoded><![CDATA[<p>Before our previous article, our code to model a mechanic used to look like this:</p>
<pre class="brush:java">class Mechanic {
    private final Engine engine = ServiceLocator.getCar().getEngine();
    public void fixEngine() { /* ... */ }
}
</pre>
<p>Luckily, we applied some dependency injection, resulting in nicer code: testable, and with an explicit dependency on the <code>ServiceLocator</code>:</p>
<pre class="brush:java">class Mechanic {
    private final Engine engine;
    public Mechanic(final ServiceLocator serviceLocator) {
        engine = serviceLocator.getCar().getEngine();
    }
    public void fixEngine() { /* ... */ }
}
</pre>
<p>However, does our mechanic care about the <code>ServiceLocator</code> at all? Not really, it doesn&#8217;t even store a reference to it! <strong>The mechanic just wants an engine</strong>.</p>
<p>There are some problems with this kind of code:</p>
<ul>
<li>The <code>ServiceLocator</code> probably has references to a lot of other classes in the system. By the transitive property, our <code>Mechanic</code> class is too coupled with the rest of the system: if you want to reuse it in a different project, you&#8217;d need to reference not only <code>Mechanic</code> and <code>Engine</code>, but also the <code>ServiceLocator</code> with all its dependencies.</li>
<li>The API is not clear. An API client knows that it&#8217;d need to provide the <code>ServiceLocator</code> (already an advantage respect to the Singleton-based case). What it doesn&#8217;t know is what the mechanic really needs (an engine). This fact is hidden in the source code.</li>
<li>The tests contain a lot of setup junk that masks its real purpose. For every test of the mechanic, you&#8217;d need to mock the ServiceLocator, and then make sure the appropriate reference can be retrieved from it (the <code>Engine</code>, in this case). When we test the class <code>Garage</code>, that needs a <code>Mechanic</code>, we&#8217;ll have to replicate this tedious setup there too.</li>
</ul>
<p>This is how the test looks like now:</p>
<pre class="brush:java">
@Test
public void testCantFixBrokenDownEngine() {
    final Engine engine = EngineFactory.buildBrokenEngine();
    final Car mockCark = Mockito.mock(Car.class);
    Mockito.when(mockCar.getEngine()).thenReturn(engine);
    final ServiceLocator mockServiceLocator = Mockito.mock(ServiceLocator.class);
    Mockito.when(mockServiceLocator.getCar()).thenReturn(car);
    final Mechanic mechanic = new Mechanic(mockServiceLocator);
    mechanic.fixEngine();
    assertFalse(engine.works());
}
</pre>
<p><strong>Why not just ask for what you need?</strong></p>
<pre class="brush:java">
class Mechanic {
    private final Engine engine;
    public Mechanic(final Engine engine) {
        this.engine = engine;
    }
    public void fixEngine() { /* ... */ }
}
</pre>
<pre class="brush:java">
@Test
public void testCantFixBrokenDownEngine() {
  Engine engine = EngineFactory.buildBrokenEngine();
  Mechanic mechanic = new Mechanic(engine);
  mechanic.fixEngine();
  assertFalse(engine.works());
}
</pre>
<p><strong>Everyone wins:</strong></p>
<p>API writers:</p>
<ul>
<li>Unaffected by ServiceLocator changes</li>
<li>In-code documentation is easier to write (what was your comment on the <code>Mechanic</code>&#8217;s constructor for the <code>ServiceLocator</code>)?</li>
</ul>
<p>Test writers:</p>
<ul>
<li>Tests are easy to read</li>
<li>Very little setup code</li>
<li>Unaffected by <code>ServiceLocator</code> changes</li>
</ul>
<p>API users:</p>
<ul>
<li>The API is clear: the mechanic needs an engine</li>
</ul>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fdont-look-for-things-ask-for-them%2F&amp;linkname=Don%26%238217%3Bt%20look%20for%20things.%20Ask%20for%20them%21"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/" title="Can&#8217;t test that Singleton? Try Dependency Injection!">Can&#8217;t test that Singleton? Try Dependency Injection!</a></li><li><a href="http://www.androidsx.com/how-to-write-untestable-code/" title="How to write untestable code">How to write untestable code</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/dont-look-for-things-ask-for-them/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t test that Singleton? Try Dependency Injection!</title>
		<link>http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/</link>
		<comments>http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 20:40:06 +0000</pubDate>
		<dc:creator>Pablo Pera Mira</dc:creator>
				<category><![CDATA[software quality]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=60</guid>
		<description><![CDATA[So you want to test this method:

public class Client {

    public int process(Params params) {
        final Server server = Server.getInstance();
        final Data data = server.retrieveDate(params);
        // do stuff
    [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to test this method:</p>
<pre class="brush:java">
public class Client {

    public int process(Params params) {
        final Server server = Server.getInstance();
        final Data data = server.retrieveDate(params);
        // do stuff
    }
}
</pre>
<p>We don&#8217;t want to retrieve an instance of a real server for our little unit-test, so how can we test this method?</p>
<p><strong>It is hard to test code that uses singletons.</strong></p>
<p>We don&#8217;t control the creation of the singleton object, as it is performed inside a static method. There is no way to mock the object in order to test the behavior of our method in isolation.</p>
<p><strong>Refactor it to use Dependency Injection.</strong></p>
<p>You can refactor <code>Client</code> to avoid using the singleton pattern. Instead of obtaining the Server instance from the static <code>getInstance()</code> method, allow <code>Client</code> to accept it through its constructor.</p>
<pre class="brush:java">
public class Client {
    private final Server server;  

    public Client(Server server) {
        this.server = server;
    }  

    public int process(Params params) {
        final Data data = server.retrieveData(params);
        // do stuff
    }
}
</pre>
<p>Let&#8217;s write that test now:</p>
<pre class="brush:java">
@Test
public void testConnectionUpTime() {
    final Server mockServer = Mockito.mock(Server.class);
    final Params params = // ...
    Mockito.when(mockServer.process(params)).thenReturn(5);
    final Client client = new Client(mockServer);
    assertEquals(5, client.process(params));
}
</pre>
<p><strong>The code is now both clearer and testable.</strong></p>
<p>The dependency between the client and the server is now explicit: <code>Client client = new Client(server);</code>. There is no way a developer creates a client instance without noticing that a server instance must be configured: it is a parameter in the constructor.</p>
<p>The singleton allowed to create a client instance without configuring the server in advance. The object would be successfully created and the application would execute, until one of the methods runs into a non-configured/non-reachable/null server and fail at runtime :&#8217;-(</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fcant-test-that-singleton-try-dependency-injection%2F&amp;linkname=Can%26%238217%3Bt%20test%20that%20Singleton%3F%20Try%20Dependency%20Injection%21"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Related posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/dont-look-for-things-ask-for-them/" title="Don&#8217;t look for things. Ask for them!">Don&#8217;t look for things. Ask for them!</a></li><li><a href="http://www.androidsx.com/how-to-write-untestable-code/" title="How to write untestable code">How to write untestable code</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hello android world!</title>
		<link>http://www.androidsx.com/hello-world/</link>
		<comments>http://www.androidsx.com/hello-world/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 12:50:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.androidsx.com/?p=1</guid>
		<description><![CDATA[This is where we share our experience with the Android platform. Also, find articles about software quality and testing that we will write in a weekly basis.


This is where we share our experience with the Android platform. Also, find articles about software quality and testing that we will write in a weekly basis.


Random Posts6 things [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">This is where we share our experience with the Android platform. Also, find articles about software quality and testing that we will write in a weekly basis.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">
<div>This is where we share our experience with the Android platform. Also, find articles about software quality and testing that we will write in a weekly basis.</div>
</blockquote>
</div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.androidsx.com%2Fhello-world%2F&amp;linkname=Hello%20android%20world%21"><img src="http://www.androidsx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><h3  class="related_post_title">Random Posts</h3><ul class="related_post"><li><a href="http://www.androidsx.com/6-things-weve-learned-from-the-android-market/" title="6 things we&#8217;ve learned from the Android market">6 things we&#8217;ve learned from the Android market</a></li><li><a href="http://www.androidsx.com/dont-look-for-things-ask-for-them/" title="Don&#8217;t look for things. Ask for them!">Don&#8217;t look for things. Ask for them!</a></li><li><a href="http://www.androidsx.com/cant-test-that-singleton-try-dependency-injection/" title="Can&#8217;t test that Singleton? Try Dependency Injection!">Can&#8217;t test that Singleton? Try Dependency Injection!</a></li><li><a href="http://www.androidsx.com/how-to-write-untestable-code/" title="How to write untestable code">How to write untestable code</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.androidsx.com/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
