<?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>Colin Wren</title>
	<atom:link href="http://colinwren.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://colinwren.com</link>
	<description>Developer, Musician, Warranty Voider</description>
	<lastBuildDate>Thu, 10 May 2012 19:20:45 +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>Global Accessibility Awareness Day</title>
		<link>http://colinwren.com/global-accessibility-awareness-day/</link>
		<comments>http://colinwren.com/global-accessibility-awareness-day/#comments</comments>
		<pubDate>Thu, 10 May 2012 19:20:45 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[web developement]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[gaad]]></category>
		<category><![CDATA[hssm]]></category>
		<category><![CDATA[lgsm]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=623</guid>
		<description><![CDATA[The mouse revolutionised the way we interact with computers. Being able to see your physical movements interact with elements on screen brings a greater depth of control and precision. This is why the modern personal computer is set up with the mouse being the primary method of interaction, it allows users to feel like they [...]]]></description>
			<content:encoded><![CDATA[<p>The mouse revolutionised the way we interact with computers. Being able to see your physical movements interact with elements on screen brings a greater depth of control and precision. This is why the modern personal computer is set up with the mouse being the primary method of interaction, it allows users to feel like they are actually achieving things quicker and this ups the user experience. This of course makes it much harder for users that aren&#8217;t able to use a mouse (or other means of pointing device) to navigate around their computers. </p>
<p>Looking at the future it looks like pointing devices will play even more of a role as keyboards are stripped out and replaced with on screen keyboards in tablets and smart phones. Without a textual awareness of where one is on these keyboards (ever wondered what the raised bits on the F and J keys are?) it is very hard to ensure that you are hitting the right keys which is important when that&#8217;s your only means of navigation.</p>
<p><a href="http://www.mysqltalk.com/gaad.html" title="GAAD">Global Accessibility Awareness Day</a> (GAAD) asked participants to disconnect their mouse for an hour and experience using their computer using the keyboard alone. This initiative is a great means to make people think about the way they use computers and shows gaps in their knowledge of system shortcuts (I for instance click on the spotlight logo, when Cmd+Space does the same job). </p>
<p>I would argue that navigating software via keyboard alone should be part of any testing process for web, mobile and software developers who work within the NHS and government. It&#8217;s so easy sometimes to overlook accessibility when the pressure is on but by taking an hour to navigate using the keyboard alone can help pinpoint any areas you&#8217;ve missed and save an expensive redevelopment further down the line.</p>
<p>Of course if you&#8217;re developing command line tools I think you&#8217;re fairly safe <img src='http://colinwren.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>What is it like to navigate a Mac without a mouse?</h3>
<p>I&#8217;m a Mac person at home. I&#8217;ve tested the website at work with WebbIE to ensure it&#8217;s screen reader friendly but for participating in GAAD I spent some time on my own computer to experience it as a &#8216;consumer&#8217;.</p>
<p>Mac OS X includes a programme called Voice Over. Voice Over uses the keyboard keys to navigate around the elements on screen. It achieves this using the Ctrl + Alt and then the Arrow keys, you enter elements using the Ctrl + Alt + Shift + Down Arrow combination and you leave elements using the Ctrl + Alt + Shift + Up Arrow combination. </p>
<p>My first impression of Voice Over was that it was a massive undertaking to learn all the commands but after a while I learned that these commands where hardly used in general usage. I had a few issues early on when the tutorial failed to give me access to the elements it was explaining how to navigate once I was past the tutorial it worked perfectly.</p>
<p>As a built in programme Voice Over did it&#8217;s job, I was able to launch Chrome from the dock (Ctrl + Alt + D) and then use it to navigate to a few websites I wanted to test. I found that Chrome splits the browser into three elements; the tab bar, the navigation bar and the webview. The navigation bar took some time for me to figure out but I got there eventually. One thing of note was the fact that on loading a normal webpage I was brought out of the webview element, so had to re-enter it to interact with the page (on Facebook this wasn&#8217;t the case but I guess this is due to javascript bringing in elements of the page).</p>
<h3>My journey through the web </h3>
<p>I visited the following websites during my hour:</p>
<ul>
<li><a href="http://www.stgeorges.nhs.uk" title="ST George's">www.stgeorges.nhs.uk</a></li>
<li><a href="http://www.chelwest.nhs.uk" title="Chelsea and Westminster">www.chelwest.nhs.uk</a></li>
<li><a href="http://www.gov.uk" title="Gov Beta">www.gov.uk</a></li>
<li><a href="http://www.facebook.com" title="Facebook">www.facebook.com</a></li>
</ul>
<p>First off I visited the website I work on (<a href="http://www.stgeorges.nhs.uk" title="ST Geoge's">www.stgeorges.nhs.uk</a> ).  As I mentioned early I have tested the website a while back using WebbIE. This browser strips out the Javascript and CSS of the page where as my Voice Over and Chrome combination didn&#8217;t. This made a difference as it meant that my path through the content wasn&#8217;t strictly top to bottom as WebbIE&#8217;s path was. Two things I found affected every page I visited:</p>
<ul>
<li>Jump links didn&#8217;t work properly</li>
<li>Inline links seem to break Voice Over&#8217;s flow of speech </li>
</ul>
<p>Generally the website was easy to navigate I was able to go through the pages jumping from element to element and it read all the text clearly. There were a few things I picked up on though, these were:</p>
<ul>
<li>The Voice Over software says the term GPs (as in general practitioners) as GPS (as in global positioning satellite)</li>
<li>We use vertical lines in our navigation to separate the options on top of the page, Voice Over picked up on these</li>
</ul>
<p>After seeing how the St George&#8217;s site performed I decided to test Chelsea and Westminster Hospital Foundation NHS Trust&#8217;s website. The reason I chose this site was because it&#8217;s a relatively new build and they use a CMS we are interested in. </p>
<p>Again the site performed well and was generally easy to navigate through but there was one issue I did encounter with the main navigation bar and looking through the source I can&#8217;t comprehend how it came to be. </p>
<p>On navigating through the main navigation Voice Over only said &#8216;link&#8217; / &#8216;visited link&#8217; instead of &#8216;link &#8211; Services&#8217; / &#8216;visited link &#8211; Services&#8217;. It wasn&#8217;t until I entered the element that I was able to hear the text of the button. I think this may have been due to the button&#8217;s text being put inside of a span tag.</p>
<p>After visiting Chelsea and Westminster&#8217;s site I chose to try out the new gov.uk website as this looks really awesome. I had problems straight way when accessing the site though, I think this was due to the setup I was using but I encountered the following issues:</p>
<ul>
<li>On first hitting a page a big box covers a fair portion of the screen explaining the use of cookies on the site. The HTML for this box must be towards the end of the page&#8217;s HTML as I had to jump through all the pages elements (it was reading the elements behind the box) to eventually press the close button.</li>
<li>On trying to access the search box on the homepage I wasn&#8217;t actually able to type in the box or enter the element meaning that the notion of it being a Google for government was ruined for me</li>
</ul>
<p>As stated though, this may have been my setup and I&#8217;m sure that using a screen reader like WebbIE would not raise the same issues.</p>
<p>After giving up trying to use the gov.uk website I thought I&#8217;d try Facebook as it&#8217;s most visited site. Surprisingly I was able to navigate through it. The one thing I will say is that there are way too many elements that make up the like, comment, share links. Navigating through all the posts on my wall was really hard but I was successful in my attempts to respond to a couple of posts, check my notifications and search.</p>
<h3>Summary</h3>
<p>My experience using my Mac via keyboard commands was a big learning curve initially but once I understood the basic principles I was able to achieve most tasks effortlessly. I think that if I was to rely on my keyboard alone for navigating the web that I&#8217;d switch my browser for Lynx or a more accessible browser due to the issues I had but overall it went smoothly and I was able to achieve the tasks I needed to.</p>
<p>The GAAD initiative should be promoted among developers and a culture of going mouse-less during testing should be adopted to iron out any accessibility issues. I think one of the reasons the initiative works is because not only does it give a developer first hand experience of using their product in this way but it also makes them do so with the tools built into the computer.</p>
<p>Any developer can whip out a £700 screen reading program and claim their product to be accessible but by going mouse-less throughout the whole process and using the system&#8217;s accessibility tools they can see access issues like a normal user would.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/global-accessibility-awareness-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A tool to help with creating gdal_translate commands</title>
		<link>http://colinwren.com/a-tool-to-help-with-creating-gdal_translate-commands/</link>
		<comments>http://colinwren.com/a-tool-to-help-with-creating-gdal_translate-commands/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 23:54:21 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[abstraction]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[creator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[gdal_translate]]></category>
		<category><![CDATA[geospatial]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mapkit]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[overlays]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[transformation]]></category>
		<category><![CDATA[vrt]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=620</guid>
		<description><![CDATA[The Geospatial Data Abstraction Library (GDAL) is an awesome library for all kinds of map and geospatial based transformations and calculations. I&#8217;m currently using it to add a custom overlay on the map in an iPhone app I&#8217;m making. When making a custom overlay you use the GDAL&#8217;s gdal_translate function to create an image file [...]]]></description>
			<content:encoded><![CDATA[<p>The Geospatial Data Abstraction Library (GDAL) is an awesome library for all kinds of map and geospatial based transformations and calculations. I&#8217;m currently using it to add a custom overlay on the map in an iPhone app I&#8217;m making. When making a custom overlay you use the GDAL&#8217;s <code>gdal_translate</code> function to create an image file containing geographical information (in VRT format).</p>
<p>The problem is that the syntax is rather odd (full options here) and can be very long winded to type out, especially if you make an error. To help with this I&#8217;ve created a simple jQuery powered tool over on JS Bin. This tool asks you for a few simple parameters and once the form is complete it will spit out a command you can copy and paste directly into Terminal / command prompt.</p>
<p>You can find the tool at <a href="http://jsbin.com/ivirin/33" title="gdal_translate command creator">http://jsbin.com/ivirin/33</a>, feel free to clone it and have fun with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/a-tool-to-help-with-creating-gdal_translate-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating healthcare apps on a NHS computer</title>
		<link>http://colinwren.com/creating-healthcare-apps-on-a-nhs-computer/</link>
		<comments>http://colinwren.com/creating-healthcare-apps-on-a-nhs-computer/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 19:56:36 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[web developement]]></category>
		<category><![CDATA[a]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[for]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nhs]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[to run]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[using]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=613</guid>
		<description><![CDATA[I&#8217;m hoping that in publishing this post I&#8217;m able to illustrate the options that NHS staff have open to them to create healthcare apps on their work computers. Due to the limitations (understandably) put in place by IT departments the notion of developing apps in house can seem impossible but this post seeks to empower [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m hoping that in publishing this post I&#8217;m able to illustrate the options that NHS staff have open to them to create healthcare apps on their work computers. Due to the limitations (understandably) put in place by IT departments the notion of developing apps in house can seem impossible but this post seeks to empower anyone with an interest and the willpower to jump through the hurdles put in place.</p>
<h3>My definition of a (standard) NHS computer</h3>
<p>From my experience the common NHS PC setup is a Windows XP professional machine that uses network drives for storage. This means that no sensitive data is left on the physical machine and it&#8217;s all stored in a centralised place. While this method is great for security and governance it means that the tools available to a developer are very limited. Companies tend to assume that the machines running their tools are newer or they block out older operating systems in a bid to get you to upgrade (Microsoft and Apple are guilty of this).</p>
<h3>What platforms can be targeted on a NHS computer</h3>
<p>As explained the operating system immediately removes a few platforms. You need a Mac to develop for iOS and Windows Mobile 7 requires Vista or greater. You are able however to develop for the following platforms:</p>
<ul>
<li><a href="http://developer.android.com/index.html" title="Android">Android</a></li>
<li><a href="http://phonegap.com/start#blackberry" title="Blackberry">Blackberry</a></li>
<li><a href="http://phonegap.com/start#webos" title="WebOS">WebOS (using Phonegap)</a></li>
<li><a href="http://phonegap.com/start#symbian" title="Symbian">Symbian (using Phonegap)</a></li>
</ul>
<p><em>You can use Phonegap&#8217;s build service to target all the major platforms but this blog post is looking at tools that will run on the hardware.</em></p>
<h3>Dealing with IT</h3>
<p>The biggest roadblock in getting app development tools set up on a NHS computer will be IT. As much as I appreciate the service and support they provide it can be hard justifying your needs to them. They hold the keys to installing any software on the computer unless you have administration privileges (I do but it took a complete reinstall of Windows to get it) so you&#8217;ll need a definitive list of what needs to be installed so you can crack on.</p>
<p>Dependent where you sit in your organisation it might be easier or harder to get someone in a high position to put their authority behind your request. The way that I did this was to talk to my director of communications (I sit in comms so he&#8217;s technically my manager) and explain why apps are the way forward, showed a few NHS examples and that any apps I build will go through our patient information group.</p>
<p>Below is a list of tools needed for each platform</p>
<h4>Android</h4>
<ul>
<li><a href="http://www.eclipse.org/downloads/" title="Eclipse">Eclipse</a> (requires the use of the installer service)</li>
<li><a href="http://developer.android.com/sdk/eclipse-adt.html#installing" title="Android SDK">Android SDK and Android ADT</a>, this is easiest setup from within Eclipse (which requires internet access to Google&#8217;s servers and admin rights to run the setup scripts</li>
<li>Rights set up so that Eclipse can compile apps and launch the emulator</li>
</ul>
<h4>Blackberry</h4>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html#jdk" title="Java SDK">Java SDK</a> (requires use of the installer)</li>
<li><a href="http://ant.apache.org/bindownload.cgi" title="Apache ant">Apache Ant </a>(requires use of the installer and rights to set PATH in the command prompt)</li>
<li><a href="https://bdsc.webapps.blackberry.com/html5/download/sdk" title="Blackberry SDK">Blackberry SDK</a> (requires use of the installer)</li>
<li><a href="http://www.adobe.com/devnet/air/air-sdk-download.html" title="Adobe Air">Adobe Air</a> (requires use of the installer)</li>
<li><a href="http://us.blackberry.com/apps-software/desktop/" title="Blackberry device connect">Blackberry emulator / Blackberry device connect</a> (requires use of the installer)</li>
</ul>
<h4>WebOS</h4>
<ul>
<li><a href="http://www.virtualbox.org/" title="Virtual Box">Virtual Box</a> (requires use of the installer, needs to have rights to create virtual machine environments)</li>
<li><a href="http://developer.palm.com/index.php?option=com_content&#038;view=article&#038;layout=page&#038;id=1788&#038;Itemid=321" title="WebOS SDK">WebOS SDK</a> (requires internet access to the WebOS SDK download site)</li>
<li><a href="http://www.cygwin.com/setup.exe" title="Cygwin">Cygwin</a> (it is highly likely that IT will object to this as it essentially renders any Windows network security features useless)</li>
</ul>
<h4>Symbian</h4>
<ul>
<li><a href="http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html" title="S60 SDK">S60 SDK</a> (requires installer, contains an emulator so is optional)</li>
<li><a href="http://www.cygwin.com/setup.exe" title="Cygwin">Cygwin</a> (it is highly likely that IT will object to this as it essentially renders any Windows network security features useless)</li>
</ul>
<p>As noted in the WebOS and Symbian tools list Cygwin will be very hard to get IT to set up especially if IT don&#8217;t think you are experienced in system admin enough. Cygwin is a tool that allows you to run the <em>make</em> tool in the command prompt which compiles an app from a make file, it achieves this by bringing in a few Linux tools into the Windows environment. A few of these tools allow an experienced user to get around Windows network protocols and access files and other information they shouldn&#8217;t, it&#8217;s highly recommended if you are granted the ability to use Cygwin that you are aware of these security risks.</p>
<p>When using my work computer I&#8217;ve found that I can&#8217;t use the command prompt to cd into the C drive where a lot of software installs itself by default, instead I can only use the command prompt within my shared drive. In the case of Apache Ant I moved the files I needed to access to my shared drive and set up PATH to use these files. This requires a bit of fiddling but is a lot easier than trying to get access to cd out of the shared drive.</p>
<h3>Other tools</h3>
<p>The development tools aren&#8217;t the only tools needed to create apps. You&#8217;ll need to create icons of various sizes, splash screens and other assets so be sure to obtain a graphics editor (MS paint just won&#8217;t cut it I&#8217;m afraid). A couple of free packages I&#8217;d recommend are <a href="http://inkscape.org/" title="Inkscape">Inkscape</a> and <a href="http://gimpshop.com/" title="GimpShop">GimpShop</a> (which is a photoshop like version of GIMP)</p>
<p>Eclipse is a good editor for files but if you&#8217;re building a Phonegap app then you may want a more lightweight editor to make changes with. I&#8217;d recommend <a href="http://notepad-plus-plus.org/" title="Notepad++">Notepad++</a> which I use everyday in my day job. Likewise if you&#8217;re using Phonegap you may wish to get a browser that renders similar to the browser in the platform you are targeting. All the platforms use the Webkit render engine (apart from older Blackberry models) so use Safari or Google Chrome as they both use the same rendering engine as the default browser.</p>
<h3>What to take away from this</h3>
<p>Hopefully this post has given some indication to the options available to NHS staff using the systems they have to work with. The side benefit of removing iOS is that you can immediately start building apps without spending any money. Blackberry handsets also seem to the preferred choice for the NHS to give to it&#8217;s executives, meaning that it&#8217;s more or less likely when writing apps for exec staff you won&#8217;t be targeting iOS anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/creating-healthcare-apps-on-a-nhs-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NHS Apps, Clinical Governance and Mobile Phone Service Providers</title>
		<link>http://colinwren.com/nhs-apps-clinical-governance-and-mobile-phone-service-providers/</link>
		<comments>http://colinwren.com/nhs-apps-clinical-governance-and-mobile-phone-service-providers/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 23:15:01 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[web developement]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[by]]></category>
		<category><![CDATA[cached]]></category>
		<category><![CDATA[clinical]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[governance]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nhs]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[provide]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[risk]]></category>
		<category><![CDATA[sector]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[Wifi]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=598</guid>
		<description><![CDATA[The app I&#8217;ve been working on for work is finally at a point where we&#8217;re happy for it to go to launch. It&#8217;s that time where rigorous testing and everyone tries to flat out break the app to make me look a bit silly. So far it&#8217;s holding up well but there was one issue that although [...]]]></description>
			<content:encoded><![CDATA[<p>The app I&#8217;ve been working on for work is finally at a point where we&#8217;re happy for it to go to launch. It&#8217;s that time where rigorous testing and everyone tries to flat out break the app to make me look a bit silly. So far it&#8217;s holding up well but there was one issue that although doesn&#8217;t lie with the app developer (it&#8217;s not my fault) it does deserve a blog post as it poses a clinical governance risk.</p>
<p>On loading the app it checks the web server for two JSON files and if they are newer than the locally saved files it downloads them. This has been working perfectly in the simulator, my old iPhone via WiFi and on another iPhone I tested the app on over 3G. Today I tested it on my colleagues o2 iPhone over 3G. To my surprise it never updated. I initially thought that it was a network issue given the poor reception we get in my office so I hooked the phone up to Xcode and ran a bunch of NSLogs to see what was going on.</p>
<p>It turns out no matter how many times I changed the apps Cache policy and cleared the shared cache it would not load the new version. It wasn&#8217;t until I tested over WiFi that I was actually able to see the actual issue, o2 (and there&#8217;s potential that other mobile phone service providers do this too) caches the content. This means that o2 is caching the 11KB file that the app is trying to load and when a new version is issued instead of allowing the new version to be downloaded it is instead sending the old version it has cached. Luckily the app I&#8217;m making is just an enhanced version of a generic patient information leaflet so doesn&#8217;t contain any data that could result in clinical error but in an app that requires updates to guidance this can cause serious risk.</p>
<p>The idea from o2&#8242;s perspective is to increase the speed that it&#8217;s users can access this data as it takes less time for them to download the data and if it&#8217;s used by multiple users then it cuts down on o2&#8242;s bandwidth use, this has massive benefits for photos and other media. The problem with this is that it creates a potential clinical governance issue as depending on how often the cached data is updated it could be days before a healthcare professional receives new guidance.</p>
<p>The illustration I&#8217;ve created below explains what&#8217;s going on</p>
<p><a href="http://colinwren.com/wp-content/uploads/2012/04/dataissue.png" rel="prettyPhoto[598]"><img class="aligncenter size-full wp-image-604" title="dataissue" src="http://colinwren.com/wp-content/uploads/2012/04/dataissue.png" alt="" width="644" height="450" /></a></p>
<p>As you can see the phone is asking for the data but on the second request for the data as the mobile service provider&#8217;s caching server has been asked to get the data recently it is returning the old data.</p>
<h3>How to prevent this from happening</h3>
<p>After identifying this issue I started looking at ways of preventing o2 (and others) from caching this data as it&#8217;s only 11KB. I came across <a title="Stuart Roebuck's Blog" href="http://stuartroebuck.blogspot.co.uk/" target="_blank">Stuart Roebuck&#8217;s </a>excellent posts on the subject (<a title="Stuart Roebucks initial post on o2 cache" href="http://stuartroebuck.blogspot.co.uk/2010/07/mobile-proxy-cache-content-modification.html" target="_blank">His initial post on it causing Javascript to break</a>, <a title="Stuart Roebuck's post on bypassing o2 cache" href="http://stuartroebuck.blogspot.co.uk/2010/08/official-way-to-bypassing-data.html" target="_blank">His post on how to bypass the cache</a>). These posts show that there is a HTTP header you can utilise if you are able to set these up on the server holding the data.</p>
<blockquote><p>Cache-Control: no-transform</p></blockquote>
<p>When you send this HTTP header along with your data it means that o2&#8242;s caching server won&#8217;t cache the data and allow you to download the information without it touching it. Of course this will only work if you are able to change this header yourself or via the server administrator. It&#8217;s best to apply this HTTP header to a single folder that contains data you don&#8217;t want cached. This means that the rest of your sites content can be cached, resulting in faster load times.</p>
<h3>Applying this solution in a NHS / public sector environment</h3>
<p>The public sector tends to hire agencies to produce and manage it&#8217;s websites and apps. In a worst case scenario this can mean that an app produced by one agency (unaware of the caching problem) could take a month to reveal this issue, once this has been identified it may take another week for the agency managing the website&#8217;s server to apply the HTTP headers to the folder holding the data. </p>
<p>Luckily both Windows and Linux servers have a way to apply rules to a folder via a text file. Windows servers use a file called web.config which uses XML to define how to handle the folder whereas Linux servers running Apache use a file called .htaccess which is a plain text file, these are &#8216;invisible&#8217; by default so you may need to set your FTP client to show &#8216;invisble&#8217; files. I&#8217;ve posted both solutions below. Simply create the file for you server and paste the code to set up the HTTP header for the folder holding your data.</p>
<p>Apologies for the links, I&#8217;m currently experiencing an issue with posting code on my blog.</p>
<h4>Microsoft web.config setup</h4>
<p>https://gist.github.com/2362280</p>
<h4>Apache .htaccess setup</h4>
<p>https://gist.github.com/2362454</p>
<h3>What to take away from this</h3>
<p>It&#8217;s important that you don&#8217;t let these little things put you off making / commissioning an app, the solution takes no time to set up, it just requires a bit of chasing. Here&#8217;s a few bullets on what to think about when looking at a NHS app that will grab data over a non WiFi network:</p>
<ul>
<li>Make sure the server holding the data has the &#8216;Cache-Control: no-transform&#8217; HTTP header set up</li>
<li>Test the app on as many phones and over as many different data speeds as possible. The iPhone simulator doesn&#8217;t simulate connection speeds or caching handled by the mobile phone service provider</li>
<li>Make sure any agencies you use are aware of this so they don&#8217;t make this mistake</li>
<li>Name and shame any networks you find that cache data in the comments so we can add to Stuart&#8217;s list of networks that do this</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/nhs-apps-clinical-governance-and-mobile-phone-service-providers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NHS App branding: a thought</title>
		<link>http://colinwren.com/nhs-app-branding-a-thought/</link>
		<comments>http://colinwren.com/nhs-app-branding-a-thought/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 16:06:24 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[guidelines]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nhs]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=562</guid>
		<description><![CDATA[Recently I&#8217;ve been doing a lot of work with iPhone and Android apps for work, one aspect that I overlooked was the branding of apps. The NHS brand brings with it a lot of authority and credibility that will help your app rise up the rankings but how does one apply the branding when the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been doing a lot of work with iPhone and Android apps for work, one aspect that I overlooked was the branding of apps. The NHS brand brings with it a lot of authority and credibility that will help your app rise up the rankings but how does one apply the branding when the only elements (I&#8217;m using iOS in this example, Android is more customisable) that you can put a logo on are the app icon, the splash screen (shows for about 2 seconds, and only if the app isn&#8217;t already running) and the view&#8217;s background?</p>
<p>The <a title="NHS Website branding" href="http://www.nhsidentity.nhs.uk/all-guidelines/guidelines/acute-trusts/websites" target="_blank">NHS Identity website has guidelines for NHS websites</a> but not apps which is a little bit archaic considering how much mobile has changed the playing field. Of course the diversity of mobile branding elements doesn&#8217;t make this easy considering the bare-minimum branding for an iPhone app  is the following:</p>
<ul>
<li>512x512px logo for iTunes</li>
<li>114x114px icon for Retina display iPhones (4/4S)</li>
<li>58x58px icon for non Retina display iPhone (3G, 3GS)</li>
<li>640x960px splash screen for Retina display iPhones (4, 4S)</li>
<li>320x480px splash screen for non Retina display iPhones (3G, 3GS)</li>
</ul>
<p>If you add the iPad you&#8217;re looking at 3 more resources (and another 3 for Retina display iPads). On top of this Android supports multiple (at lesast 4) screen resolutions and you&#8217;ll need another bunch of icons if you&#8217;re supporting Blackberry and Windows Mobile.</p>
<p>Of course most NHS apps are produced by companies that have experience in this but people like myself who are doing this by themselves, working from home and learning as they go won&#8217;t be aware of the myriad of icons sizes they need to produce. The website guidelines are a good start to branding an app but there are some challenges unique to apps where you are trying to utilise the OS&#8217;s UI elements to provide a good experience not reflect the authority of the data source. Once a user is using the app essentially your app will look the same as any other app (with a few exceptions).</p>
<p>Maybe some research could be put into seeing how NHS service users find different ways of displaying buttons, tables and other UI elements on mobiles so that developers can ensure that their app will be well received and easy to use. The app stores are fickle markets and keeping users is a lot harder than getting them in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/nhs-app-branding-a-thought/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My new recording kit</title>
		<link>http://colinwren.com/my-new-recording-kit/</link>
		<comments>http://colinwren.com/my-new-recording-kit/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 23:02:05 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[8]]></category>
		<category><![CDATA[alesis]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[creation]]></category>
		<category><![CDATA[e606]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[io|2]]></category>
		<category><![CDATA[logic]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[mic]]></category>
		<category><![CDATA[pro]]></category>
		<category><![CDATA[sennheiser]]></category>
		<category><![CDATA[studio]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=483</guid>
		<description><![CDATA[Recently I was a bit naughty a shelled out around £210 for some kit that would help me with my music project. I had just installed Logic 8 onto my Mac Pro and found that my PS Eye, which I had used for recording purposes before hand was no longer usable so I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was a bit naughty a shelled out around £210 for some kit that would help me with my music project. I had just installed Logic 8 onto my Mac Pro and found that my PS Eye, which I had used for recording purposes before hand was no longer usable so I decided to invest in an audio interface and a proper microphone.</p>
<p>Denmark Street in London is pretty much a haven for a guitarist so yesterday I jumped on the Northern Line and made my way to the newly reopened Tottenham Court Road station and went go get a cheap but decent set up.</p>
<p>I&#8217;ve been eternally pestering the staff at <a href="http://www.londonproaudio.com/catalog/" title="London Pro Audio will sort you out with what you need" class="new_window">London Pro Audio Centre</a> about cables and boxes that would allow me to program MIDI into my Gameboy so I headed there first and saw that they had a <a href="http://www.londonproaudio.com/catalog/product_info.php?cPath=25_33&#038;products_id=67" title="Alesis IO|2 on London Pro Audio's website" class="new_window">Alesis IO|2</a> on sale for £85 so decided to take advantage of the deal and while I was there I added a mic stand, XLR cable and <a href="http://www.londonproaudio.com/catalog/product_info.php?manufacturers_id=43&#038;products_id=159" title="Sennheiser e906, my mics better sibling" class="new_window">Sennheiser e606</a> to complete my set up.</p>
<p>The Alesis IO|2 works like a charm, it has two &#8216;channels&#8217; each offering XLR, line in and insert inputs. This means that when I get the money I could essentially have two mics running at once, reducing the need to keep playing my guitar over and over again.</p>
<p>The only downside I&#8217;m finding at the moment doesn&#8217;t lie with the hardware but with Logic 8. For some reason it allows a plethora of options when it comes to inputs and outputs inside the computer but only allows me to select either my IO|2 or my Griffin FireWave, this means that basically unless I use the phones socket on the IO|2 (I don&#8217;t have 3.5&#8243; headphones yet, so I&#8217;m running my Gameboy cable into my iPod dock) I can&#8217;t playback the music I&#8217;m trying to play along to!</p>
<h3>Some pics</h3>
<div id="attachment_484" class="wp-caption aligncenter" style="width: 310px"><a href="http://colinwren.com/wp-content/uploads/2011/12/DSC_0894.jpg" rel="prettyPhoto[483]"><img src="http://colinwren.com/wp-content/uploads/2011/12/DSC_0894-300x199.jpg" alt="Alesis io|2" title="Alesis io|2" width="300" height="199" class="size-medium wp-image-484" /></a><p class="wp-caption-text">Alesis IO|2</p></div>
<div id="attachment_485" class="wp-caption aligncenter" style="width: 310px"><a href="http://colinwren.com/wp-content/uploads/2011/12/DSC_0895.jpg" rel="prettyPhoto[483]"><img src="http://colinwren.com/wp-content/uploads/2011/12/DSC_0895-300x199.jpg" alt="e606 hooked up to my amp" title="e606 hooked upto my amp" width="300" height="199" class="size-medium wp-image-485" /></a><p class="wp-caption-text">Sennheiser e606 hooked up to my amp</p></div>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/my-new-recording-kit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone SDK, NSXMLParser and multiple child nodes into an array &#8211; Getting rid of whitespace</title>
		<link>http://colinwren.com/iphone-sdk-nsxmlparser-and-multiple-child-nodes-into-an-array-getting-rid-of-whitespace/</link>
		<comments>http://colinwren.com/iphone-sdk-nsxmlparser-and-multiple-child-nodes-into-an-array-getting-rid-of-whitespace/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 10:27:17 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[blank]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[nodes]]></category>
		<category><![CDATA[nsxmlparser]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=480</guid>
		<description><![CDATA[I&#8217;m currently making my first iPhone app for work, it&#8217;s designed to be an enhanced version of the leaflet given out to patients when they first arrive at the hospital. My idea was to take the information within and make it into something more iPhone friendly. On my journey through the magical world of iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently making my first iPhone app for work, it&#8217;s designed to be an enhanced version of the leaflet given out to patients when they first arrive at the hospital. My idea was to take the information within and make it into something more iPhone friendly. On my journey through the magical world of iPhone development I&#8217;ve encountered a lot of issues as I&#8217;m more a web developer than an Objective-C developer. One of these issues which I can gladly say I&#8217;ve worked out was using a XML document with multiple child nodes to create an array of the data within these nodes.</p>
<p>My XML parsing script comes from <a href="http://gigaom.com/apple/tutorial-build-a-simple-rss-reader-for-iphone/" title="Parsing a RSS feed with NSXMLParser" class="new_window">Jason Terhorst&#8217;s excellent NSXMLParser RSS feed tutorial</a>, and I used the solution to creating the <a href="http://stackoverflow.com/questions/7618247/how-to-parse-the-xml-using-nsxmlparser-with-same-names-of-multiple-nodes-in-iphon" title="Create an array from multiple nodes with NSXmlParser" class="new_window">array from this stackoverflow post</a>. With this working fine I suddenly noticed that when running <code>NSLog(@"%@",item);</code> to see how the array was being generated that It was returning something like this:</p>
<p>
<code><br />
{<br />
    "phone_number" =     (<br />
        "020 8725 0001\n",<br />
        "             \n",<br />
        "             \n",<br />
        "020 0002 0001\n",<br />
        "             \n",<br />
        "             \n",<br />
        "             \n"<br />
    );<br />
    title = "Accident and Emergency\n";<br />
}<br />
</code>
</p>
<p>NSXMLParser was parsing the indents and line breaks that I put in my XML document so I could read it easily when writing it. I&#8217;ve heard that NSXMLParser does this if there&#8217;s no DOCTYPE defined in the XML but I couldn&#8217;t get my head around the syntax for that. I then found <a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/23691-deleting-spaces-n-characters-received-xml.html" title="Stripping whitespace from the string" class="new_window">this post</a> which although removed the whitespace and line breaks still returned blank array entries for the line breaks, this led me to the solution I used.</p>
<p>My solution (included in foundCharacters so you can see what I&#8217;ve done):<br />
<code><br />
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{<br />
        NSString *trimmedString = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];<br />
        if ([currentElement isEqualToString:@"title"]) {<br />
            [currentTitle appendString:trimmedString];<br />
        }<br />
        if([currentElement isEqualToString:@"phone_number"]){<br />
            if([trimmedString isEqualToString:@""]){<br />
                return;<br />
            }else{<br />
            [phoneNumbers addObject:trimmedString];<br />
            }<br />
        }<br />
    }<br />
</code><br />
By returning when the string is nothing it doesn&#8217;t create blank array entries.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/iphone-sdk-nsxmlparser-and-multiple-child-nodes-into-an-array-getting-rid-of-whitespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have some fun with the new &#8216;timeline&#8217; Facebook Layout using GIMP/Photoshop</title>
		<link>http://colinwren.com/have-some-fun-with-the-new-timeline-facebook-layout-using-gimpphotoshop/</link>
		<comments>http://colinwren.com/have-some-fun-with-the-new-timeline-facebook-layout-using-gimpphotoshop/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 00:44:56 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web developement]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[cover]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[pic]]></category>
		<category><![CDATA[timeline]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=475</guid>
		<description><![CDATA[I&#8217;ve activated the new &#8216;timeline&#8217; Facebook layout on my profile and decided to have some fun using GIMP to make a funny picture. I&#8217;m a massive Katamari fan and I love internet humour so I decided to add the running girl to a Katamari scene. Here&#8217;s a short tutorial on what to do. Grab a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve activated the new &#8216;timeline&#8217; Facebook layout on my profile and decided to have some fun using GIMP to make a funny picture. I&#8217;m a massive Katamari fan and I love internet humour so I decided to add the running girl to a Katamari scene. Here&#8217;s a short tutorial on what to do.</p>
<ul>
<li>Grab a screenshot of your <a href="http://mashable.com/2011/09/22/how-to-facebook-timeline/" title="Activate the profile" class="new_window">profile with &#8216;timeline&#8217; activated</a></li>
<li>Make sure you have the images you need for the final product</li>
<li>In GIMP create a marquee around the biggest block (the cover), color this in Black in a new layer</li>
<li>Do the same for the smaller block (the profile pic) in a new layer</li>
<li>Scale the image you want as &#8216;the cover&#8217; down so that the main part of the image you want would be in the frame but ensure that there&#8217;s about 50px of the image under this line (we&#8217;ll use this as the background for the profile pic)</li>
<li>Scale the image you want as the profile pic to fit in the box, then delete the background so the image&#8217;s focus is the only thing showing</li>
<li>Now use the colour selection tool on the biggest block to select the entire block, change to the layer with the &#8216;cover&#8217; image, hide all other layers and crop the image. Save this somewhere</li>
<li>Use CTL/CMD + Z to go back a step so it&#8217;s not cropped</li>
<li>Now use the colour selection tool on the smaller block, change to the layer with &#8216;profile&#8217; image and then hide all other layers except the &#8216;cover&#8217; image, as your now see that the profile image fits on the cover perfectly. Scale this image to 200px by 200px (Facebook won&#8217;t let you upload this otherwise). Crop this and save this somewhere</li>
<li>Upload the images in the relevant places, make amendments if needed</li>
</ul>
<p>Here&#8217;s mine<br />
<div id="attachment_476" class="wp-caption aligncenter" style="width: 310px"><img src="http://colinwren.com/wp-content/uploads/2011/09/gimp-fun-300x206.png" alt="fun with the new timeline facebook proile" title="fun with the new timeline facebook proile" width="300" height="206" class="size-medium wp-image-476" /><p class="wp-caption-text">Fun with the new &#039;timeline&#039; Facebook profile layout</p></div>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/have-some-fun-with-the-new-timeline-facebook-layout-using-gimpphotoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing &#8216;You were almost a Jill sandwich&#8217;</title>
		<link>http://colinwren.com/announcing-you-were-almost-a-jill-sandwich/</link>
		<comments>http://colinwren.com/announcing-you-were-almost-a-jill-sandwich/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 21:50:36 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[a]]></category>
		<category><![CDATA[almost]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[jill]]></category>
		<category><![CDATA[sandwich]]></category>
		<category><![CDATA[were]]></category>
		<category><![CDATA[you]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=452</guid>
		<description><![CDATA[In October the missus (Leanna) and I will be launching our own game blog called &#8216;You were almost a Jill sandwich&#8216; on Tumblr. Named after one of our favourite lines in the original Resident Evil (thank you Barry!) the blog&#8217;s format will be a mashup of the news and fan boy styles you commonly find [...]]]></description>
			<content:encoded><![CDATA[<p>In October the missus (<a href="http://angryswan.co.uk" title="Leanna's blog" class="new_window">Leanna</a>) and I will be launching our own game blog called &#8216;<a href="http://http://www.tumblr.com/tumblelog/youwerealmostajillsandwich" title="The You were almost a jill sandwich blog" class="new_window">You were almost a Jill sandwich</a>&#8216; on Tumblr. Named after one of our favourite lines in the original Resident Evil (thank you Barry!) the blog&#8217;s format will be a mashup of the news and fan boy styles you commonly find on the internet. We&#8217;ll be covering one game over the month, during which we&#8217;ll not only be reviewing the game but creating original art, music, downloadables and maybe a game if we can to help truly celebrate the game like it deserves.</p>
<p>Putting the blog in Tumblr allows us to also tap into other blogs on there and help to bring to light other people&#8217;s work about the game and it&#8217;s over arching franchise if there is one. We&#8217;ve been talking about doing the blog for a while now but finally getting ourselves together to make this idea a reality.</p>
<p>The first game we&#8217;ll be covering is Resistance 3, which we just completed today.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/announcing-you-were-almost-a-jill-sandwich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using your HTC Sensation to debug Android apps on Ubuntu 11.04 (Natty Narwhal) using udev and adb</title>
		<link>http://colinwren.com/using-your-htc-sensation-to-debug-android-apps-on-ubuntu-11-04-natty-narwhal-using-udev-and-adb/</link>
		<comments>http://colinwren.com/using-your-htc-sensation-to-debug-android-apps-on-ubuntu-11-04-natty-narwhal-using-udev-and-adb/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 16:44:10 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[finding]]></category>
		<category><![CDATA[htc sensation]]></category>
		<category><![CDATA[it]]></category>
		<category><![CDATA[kill-server]]></category>
		<category><![CDATA[narwhal]]></category>
		<category><![CDATA[natty]]></category>
		<category><![CDATA[not]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[start-server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://colinwren.com/?p=446</guid>
		<description><![CDATA[Bit of a long winded title. I recently made the switch from the iPhone to an Android device. I&#8217;ve done a little bit of iPhone programming and found the whole process of hooking my iPhone up to my Mac quite easy. Unfortunately my Mac&#8217;s hard drive decided to kick the bucket so I installed Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>Bit of a long winded title. I recently made the switch from the iPhone to an Android device. I&#8217;ve done a little bit of iPhone programming and found the whole process of hooking my iPhone up to my Mac quite easy. Unfortunately my Mac&#8217;s hard drive decided to kick the bucket so I installed Ubuntu Natty Narwhal instead and decided my next mobile would be a HTC of some sort (a few friends had them and I loved how open they were compared to my iPhone, the widgets for instance where a major selling point). After seeing the HTC Evo 3D and having a major nerdgasm over it I had my mind set but unfortunately no UK carrier would take on the device so I settled for the HTC Sensation (which is pretty damn awesome).</p>
<p>I&#8217;m currently in the process of making a mobile app for work, the hope is that I can use my new phone to create an Android version of the app side by side with the one we&#8217;ll be releasing for the iPhone. Yesterday I set about trying to get my HTC Sensation working with the Android Debug Bridge (adb), after reading a few tutorials on the web (listed at the end of this post) I was quite stumped. I eventually mixed and matched a few and managed to get all working. My face lit up when <code>?????????? No Permissions</code> turned into <code>HT17*******	device</code>.</p>
<h3>First step &#8211; Make sure your computer can see the phone</h3>
<p>This tutorial will assume that you are running Ubuntu Natty Narwhal, you have the Android SDK running already, you know the directory it&#8217;s in and you know a little about using the terminal, I&#8217;ll try and keep it as un-technical as I can.</p>
<p>First things first plug your HTC Sensation into your computer using it&#8217;s USB lead. Go to settings > Applications > Debugging and tick the top two boxes. Now press the home button and make sure you don&#8217;t look your phone. We&#8217;ll start off running adb to see if it finds the device. Open up the terminal and type &#8216;<code>~/android-sdk-linux_x86/platform-tools/adb devices</code>&#8216;, I&#8217;ve set my Android SDK in my home folder, if you&#8217;ve placed yours else where replaces the ~ with that directory. Running this command should show all the connnected Android devices, if you see a bunch of question marks it means that it&#8217;s not recognising the device. If you see a serial number then you don&#8217;t need to do anything as it recognises it. If for some reason it doesn&#8217;t say anything type &#8216;<code>lsusb</code>&#8216; into the terminal and look for &#8216;<code>Bus 001 Device 008: ID 0bb4:0c86 High Tech Computer Corp.</code>&#8216; The bus and Device aren&#8217;t important but the other bits are. If you don&#8217;t see this then your USB lead may not be working.</p>
<h3>Second step &#8211; setting up the udev files</h3>
<p>Linux uses a thing called udev to define what devices plugged into the system do and can be used for. To get adb to use the HTC Sensation for debugging we need to create some rules for it. First let&#8217;s see if there&#8217;s any Android rules already set up. Type &#8216;<code>ls /etc/udev/rules.d/</code>&#8216; into the terminal this will list the contents of the folder where the Android udev rules would sit. If it prints out the following &#8216;<code>51-android.rules</code>&#8216; or &#8216;<code>99-android.rules</code>&#8216; then skip the next paragraph.</p>
<p>If there wasn&#8217;t either of those files then we need to create the rules for the android devices. I&#8217;m not entirely sure if 99 or 51 is the correct name for the file (the <a href="http://developer.android.com/guide/developing/device.html" title="Android dev documents udev section" class="new_window">Android Dev documents says 51</a>, this <a href="http://eddieringle.com/udev-rules-for-adb-in-ubuntu-11-04-natty-narwhal/" title="Eddie Ringle's awesome udev tutorial" class="new_window">tutorial says 99</a>) so to ensure that it works I&#8217;m going to create both. Type &#8216;<code> sudo touch /etc/udev/rules.d/51-android.rules</code>&#8216; and &#8216;<code> sudo touch /etc/udev/rules.d/99-android.rules</code>&#8216; into the terminal, this creates both files (touch creates files).</p>
<p>Now we need to add rules for the device into these files. <a href="http://forum.xda-developers.com/showthread.php?t=1210117" title="Smakked's really helpful udev snippet" class="new_window">Smakked on the XDA-developer&#8217;s forum</a> put up this awesome little snippet which I&#8217;ve been using.</p>
<p><code>#HTC Sensation<br />
SUBSYSTEM=="usb", SYSFS{idVendor}=="[0bb4]", MODE="0666"<br />
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_adb"<br />
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_fastboot"</code></p>
<p>Copy this code and then type &#8216;<code> sudo gedit /etc/udev/rules.d/51-android.rules</code>&#8216; into the terminal, this will open the 51-android file. Paste the code at the end of the document and save it. Now type &#8216;<code> sudo gedit /etc/udev/rules.d/99-android.rules</code>&#8216; into the terminal, this opens the 99-android file, again paste the code and save the file.</p>
<p>Finally we need to set the permissions for the files. Type &#8216;<code>sudo chmod a+r /etc/udev/rules.d/51-android.rules</code>&#8216; and &#8216;<code>sudo chmod a+r /etc/udev/rules.d/99-android.rules</code>&#8216; into the terminal. This will allow the system to use the files properly.</p>
<h3>Third step &#8211; Restart adb and check the device settings again</h3>
<p>So now the udev files are in place we now need to reset adb so we can use them. Type &#8216;<code>~/android-sdk-linux_x86/platform-tools/adb kill-server</code>&#8216; into the terminal. This will stop the adb daemon from running. Now unplug your HTC Sensation, I found that it didn&#8217;t find my phone until I plugged it in again. After unplugging you phone type &#8216;<code>~/android-sdk-linux_x86/platform-tools/adb start-server</code>&#8216; into the terminal, this will start the adb daemon again. Plug your phone in again, make sure it&#8217;s not locked and then type &#8216;<code>~/android-sdk-linux_x86/platform-tools/adb devices</code>&#8216; into the terminal. Hopefully you&#8217;ll see a list of numbers instead of a lot of question marks. If not maybe try restarting the computer and once it&#8217;s restarted type &#8216;<code>~/android-sdk-linux_x86/platform-tools/adb devices</code>&#8216; into the terminal again.</p>
<p>Below are a list of tutorials that helped me work this out:</p>
<ul>
<li><a href="http://developer.android.com/guide/developing/device.html" title="Android dev doc on udev" class="new_window">Android developers documentation</a></li>
<li><a href="http://eddieringle.com/udev-rules-for-adb-in-ubuntu-11-04-natty-narwhal/" title="Eddie Ringle's blog" class="new_window">Eddie Ringle&#8217;s udev on Natty Narwhal post</a></li>
<li><a href="http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/" title="Dimitar Darazhanski's blog" class="new_window">Dimitar Darazhanski&#8217;s blog</a></li>
<li><a href="http://forum.xda-developers.com/showthread.php?t=1210117" title="XDA-Developers forum" class="new_window">Smakked&#8217;s udev snippet for HTC Sensation</a></li>
</ul>
<p>If this didn&#8217;t work and you found a solution please put it in the comments.</p>
<h2>Update &#8211; 26/08/2011</h2>
<p>So since writing this tutorial I&#8217;ve found that the rules weren&#8217;t as permanent as I&#8217;d hoped. If you&#8217;re having issues with ADB after rebooting or generally go to the Terminal and type in &#8220;<code>~/android-sdk-linux_x86/platform-tools/adb kill-server</code>&#8221; and then use <code>sudo</code> to restart the server by typing &#8220;<code>sudo ~/android-sdk-linux_x86/platform-tools/adb start-server</code>&#8220;. This should hopefully make it work again as it had before.</p>
]]></content:encoded>
			<wfw:commentRss>http://colinwren.com/using-your-htc-sensation-to-debug-android-apps-on-ubuntu-11-04-natty-narwhal-using-udev-and-adb/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

