<?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/"
				  >
<channel>
<title>MiniApps Blog</title>
<link>http://miniapps.co.uk/blog/</link>
<description><![CDATA[HTML5 apps for iPhone, Android and other mobile platforms]]></description>
<language>en-us</language>
<pubDate>Mon, 06 Sep 2010 06:24:30 +0100</pubDate>
<item>
<title>Card Flip updated</title>
<link>http://miniapps.co.uk/blog/post/card-flip-updated/</link>
<pubDate>Sun, 07 Mar 2010 14:32:31 +0000</pubDate>
<description><![CDATA[<p>I spent a little time last week playing around with <a href="http://miniapps.co.uk/#cardflip">Card Flip</a> and ended up completely re-factoring the game code. The app now makes much better use of touch event handling, and is now all neatly wrapped up using JavaScript object literal notation. It is also now fully documented and has been left uncompressed, so if there are any curious developers out there, feel free to <a href="http://miniapps.co.uk/cardflip/">take a look</a>.</p>

<p>While I was at it, I also took the opportunity to fix some existing bugs with the timing, as well as introduce a new high score feature, so the game now remembers your fastest time.</p>

<p>There is no need to download an update to take advantage of this new version of Card Flip. Updates happen automatically and silently, so if you open the app now you will already be using the new code base.</p>]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/card-flip-updated/</guid>
<category>Games</category>
</item>
<item>
<title>Website updates</title>
<link>http://miniapps.co.uk/blog/post/website-updates/</link>
<pubDate>Fri, 04 Jun 2010 14:31:44 +0100</pubDate>
<description><![CDATA[<p>
	Anyone who has re&ndash;visited this site over the last few weeks will no doubt have noticed a few design changes popping up here and there. I have decided to remove the <a href="http://jqueryfordesigners.com/coda-slider-effect/">jQuery slider</a> in favour of a much simpler, list style page for app navigation. The main reason was that I could only fit so many apps on a horizontal tab navigation. This new way, I can release many more apps and not have to worry about running out of space. The old slider menu also didn&#39;t play very well with <a href="http://www.opera.com/mobile/">Opera Mini</a>, so these two reasons together were enough to convince me to change it.</p>
<p>
	The next most immediate change is that the site is no longer fixed&ndash;width. It now uses an elastic layout that is more adaptable to different screen sizes, and also makes use of <a href="http://www.w3.org/TR/css3-mediaqueries/">CSS3 Media Queries</a> to provide an optimised stylesheet for mobile devices. Desktop visitors can also test this out by resizing your browser window. Give it a go!</p>
<p>
	Finally, I have decided to switch away from the site imagery concentrating so much on the iPhone. Yes it&#39;s currently the most popular platform for apps, but I want to emphasize that my apps are more about being cross&ndash;platform &mdash; so in the coming weeks/months I aim to try and introduce imagery that is less platform specific.</p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/website-updates/</guid>
<category>General</category>
</item>
<item>
<title>Multi touch gestures using Webkit</title>
<link>http://miniapps.co.uk/blog/post/multi-touch-gestures-using-webkit/</link>
<pubDate>Wed, 10 Mar 2010 19:53:16 +0000</pubDate>
<description><![CDATA[<p>
	I thought it might be useful if I posted a working example that demonstrates how to use touch and gesture events on the iPhone/iPad using Safari and Webkit.</p>
<p>
	I won&#39;t go into depth covering the basics of how touch events work, you can read about that in <a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/">this article</a>. What I will go into, is the basics of how my template works, so that you can easily adapt it for your own applications.</p>
<p>
	First, feel free to <a href="http://miniapps.co.uk/gesture/">view the live demo</a>, and <a href="http://miniapps.co.uk/gesture/touchGesture.js">read the documented code</a>.</p>
<p>
	The HTML template file consists of a single square block that can be touched, dragged, resized and rotated using touch events. The JavaScript file provides a basis for handling six different types of touch event. The first three, <em>touchstart</em>, <em>touchmove</em> and <em>touchend</em> are all used to handle single finger touch events. In the example, the square block can be touched and dragged around the screen using a single finger. You can easily see when a <em>touchstart</em> event is triggered, as the square will turn blue in colour. If you drag your finger when the square is blue, a <em>touchmove</em> event is then triggered, and the square will follow your finger. When you release your finger, a <em>touchend</em> event is triggered, and the square will turn back to its original colour and remain where you left it on the screen.</p>
<p>
	The next three touch events, <em>gesturestart</em>, <em>gesturemove</em> and <em>gestureend</em>, are all used to handle multi touch events. These class as any touch event that uses more than one finger. In the example, a <em>gesturestart</em> event is indicated by the square block turning red in colour. A <em>gesturechange</em> event is triggered by performing a typical two finger pinch/zoom/rotate gesture, which has the effect of scaling and rotating the square. When your fingers are released, a <em>gestureend</em> event is triggered, and the square turns back to its original colour. It will also remain at the scale and angle of rotation that you left it at.</p>
<p>
	Take some time to read through the documented code and understand the way events are triggered. Any questions, please feel free to <a href="http://miniapps.co.uk/contact/">get in touch</a>.</p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/multi-touch-gestures-using-webkit/</guid>
<category>Webkit</category>
</item>
<item>
<title>Card Flip</title>
<link>http://miniapps.co.uk/blog/post/card-flip/</link>
<pubDate>Wed, 10 Feb 2010 17:23:23 +0000</pubDate>
<description><![CDATA[<p>
	This week I launched my second mobile web app, called <a href="http://miniapps.co.uk/cardflip/">Card Flip</a>. It&#39;s a simple but fun app, based on the classic card game where you must test your memory by turning over and matching pairs of cards.</p>
<p>
	The 3D animation effects you see in Card Flip are achieved via the use of <a href="http://webkit.org/blog/386/3d-transforms/">CSS3 3D transforms</a>. Currently these effects are only available in Mobile Safari on the iPhone, but Android and other mobile platforms should hopefully catch up soon. To make the game feel as quick and responsive as possible, Card Flip also makes use of native touch events. As an added bonus, offline storage is supported too. Hope you have fun playing.</p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/card-flip/</guid>
<category>Games</category>
</item>
<item>
<title>Checklist</title>
<link>http://miniapps.co.uk/blog/post/checklist/</link>
<pubDate>Tue, 05 Jan 2010 09:06:56 +0000</pubDate>
<description><![CDATA[<p>
	I'm pleased to announce the release of my first mobile web application built using <abbr>HTML5</abbr>. <a href="http://miniapps.co.uk/checklist/">Checklist</a> is a simple but efficient productivity tool, allowing you to make quick to-to or shopping lists that are stored locally to your phone. Feedback on the app has thus far been very positive, so thanks to everyone who has taken the time to give it a whirl.</p>
<p>
	Whilst being developed mainly for iPhone OS 3.0, Checklist has also been successfully tested on Android OS 2.1, Palm Pre webOS and Firefox Mobile 1.0. The app requires support for <abbr>HTML5</abbr> web storage and offline storage, but any mobile browser supporting these technologies should be fully compatible.</p>
<p>
	If you have any feedback on this app, please feel free to <a href="http://miniapps.co.uk/contact/">get in touch.</a></p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/checklist/</guid>
<category>Productivity</category>
</item>
<item>
<title>Geo Meter</title>
<link>http://miniapps.co.uk/blog/post/geo-meter/</link>
<pubDate>Sun, 21 Mar 2010 09:37:42 +0000</pubDate>
<description><![CDATA[<p>
	<a href="http://miniapps.co.uk/geometer/">Geo Meter</a> is a simple utility that tracks, processes and reports geo location data via <abbr>GPS</abbr>. I came up with the idea for this app while playing around with the <abbr>HTML5</abbr> <a href="http://dev.w3.org/geo/api/spec-source.html">Geolocation API</a>. I was previously unaware that the <abbr>API</abbr> could report additional information such as altitude, speed, heading and accuracy, as well as the more commonly used latidude and longitude values. I thought that creating a utility to track all of this data might not only be fun to play around with, but also potentially useful.</p>
<p>
	As well as providing detailed data readouts, I included some extra bits of functionality, such as integration with Google Maps and an email facility that allows you to mail your current location data. The app currently works on iPhone and Android, but I have also tested it sucessfully on the Firefox Mobile emulator.</p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/geo-meter/</guid>
<category>Utilities</category>
</item>
<item>
<title>Going open source</title>
<link>http://miniapps.co.uk/blog/post/going-open-source/</link>
<pubDate>Wed, 24 Mar 2010 19:35:12 +0000</pubDate>
<description><![CDATA[<p>So, I've decided to license all my existing (and forthcoming) mobile web apps using an open source <a href="http://miniapps.co.uk/license/">MIT license</a>. That's right &ndash; feel free to use, copy, modify, merge, publish or distribute these applications. Hell, if you can make money trying to sell my code (that is already freely available), then go right ahead. Good luck to you. The only condition, is that by doing any of the above &ndash; all copies or substantial portions of my code must include <a href="http://miniapps.co.uk/license/">this same license</a>.</p>

<p>The way I see it, the more people interested in developing mobile web applications (or <a href="http://www.quirksmode.org/blog/archives/2010/03/html5_apps.html">HTML5 apps</a>, as <abbr>PPK</abbr> puts it), the better. So, as an advocate of open source web development, I thought it might be useful to others if I put my own code out there as a learning resource. After all, that is the whole reason I started making these apps myself &ndash; to learn.</p>

<p>I've spent a considerable amount of time over the last few weeks tidying up and documenting my code. It is now in a state where I feel comfortable to leave the assets uncompressed and open for all to see. If anyone has and queries, please feel free to <a href="http://miniapps.co.uk/contact/">get in touch</a>.</p>]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/going-open-source/</guid>
<category>Open source</category>
</item>
<item>
<title>Canvas</title>
<link>http://miniapps.co.uk/blog/post/canvas/</link>
<pubDate>Fri, 30 Apr 2010 08:47:17 +0100</pubDate>
<description><![CDATA[<p><a href="http://miniapps.co.uk/canvas/">Canvas</a> is a simple but creative drawing application I created together while learning how to use the <abbr>HTML5</abbr> Canvas <abbr>API</abbr>. Ever since I started using touch events in Webkit, one of the most immediate things I wanted to create was a touch&ndash;based drawing application.</p>

<p>Canvas was developed and tested on an iPhone, but I have designed it in such a way that it should scale to any size of physical device, including the iPad. I have tested Canvas using the iPad simulator and it seems to work pretty well, but have yet to test it on a real device.</p>

<p>From initial reports I have received via Twitter, the app also seems to work well on Android devices. There are currently a few small bugs that I am aware of, but I will hopefully iron these out in the next few weeks as well as add a couple of additional features. Hope people like it.</p>]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/canvas/</guid>
<category>Utilities</category>
</item>
<item>
<title>Adaptive CSS layouts using Media Queries</title>
<link>http://miniapps.co.uk/blog/post/adaptive-css-layouts-using-media-queries/</link>
<pubDate>Wed, 23 Jun 2010 22:03:06 +0100</pubDate>
<description><![CDATA[<p>
	Over the past few weeks I have been refining the <a href="http://www.w3.org/TR/css3-mediaqueries/">CSS3 Media Queries</a> on this site in order to try and create an adaptive layout that can scale and resize to any window or screen size, whether it be on desktop, tablet or mobile device. I think (hope) that I&#39;ve got things flowing pretty smoothly now, so I thought I would post the queries here so that others can adapt them:</p>
<pre>
<code>&lt;!-- CSS MAIN STYLESHEET --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot; media=&quot;all&quot; /&gt;

&lt;!-- LAYOUTS SMALLER THAN 650px AND MOBILES --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;mobile.css&quot; media=&quot;handheld, screen and (max-width: 650px), screen and (max-device-width: 480px)&quot; /&gt;

&lt;!-- LAYOUTS BETWEEN 651px/1024px AND iPAD --&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;tablet.css&quot; media=&quot;screen and (min-width:651px) and (max-width: 1024px), screen and (min-device-width: 768px) and (max-device-width: 1024px)&quot; /&gt;</code></pre>
<p>
	I could have included all three media queries inside a single CSS file using the <code>@media</code> rule, but I quite like to keep things separate for simplicity. For now, I have chosen to use three individual stylesheets. The main site stylesheet (<code>styles.css</code>) is used as a master, and then the separate <code>mobile.css</code> and <code>tablet.css</code> stylesheets override certain CSS rules in the main stylesheet, to provide an optimised view that is dependant on the media query being used. I have also used queries based on both <code>min/max-width</code> and <code>min/max-device-width</code>, so that both desktop browsers and intermediate size devices can also make use of the adaptive stylesheets. Have a go at resizing your browser window to see the results.</p>]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/adaptive-css-layouts-using-media-queries/</guid>
<category>CSS</category>
</item>
<item>
<title>Targeting iPhone 4 using CSS Media Queries</title>
<link>http://miniapps.co.uk/blog/post/targeting-iphone-4-using-css-media-queries/</link>
<pubDate>Sat, 26 Jun 2010 16:12:09 +0100</pubDate>
<description><![CDATA[<p>
	With the release of iPhone 4 and it&#39;s 326<abbr>ppi</abbr> display, there has been a fair bit of speculation as to what impact this would have on mobile web apps and websites that are optimised for mobile screen sizes. How would web developers target both older iPhones with a 480<abbr title="times">x</abbr>320 display, as well as the iPhone 4&#39;s 960<abbr title="times">x</abbr>640 display? Would we need separate <abbr>CSS</abbr> stylesheets for each device? How would images need to be optimised for the new screens?</p>
<p>
	It turns out that <abbr>CSS</abbr> media queries <a href="http://miniapps.co.uk/blog/post/adaptive-css-layouts-using-media-queries/">testing for the older iPhone displays</a> still work on iPhone 4. It&#39;s all down to Mobile Safari utilising a <em>&#39;device to pixel ratio&#39;</em> density of 2. There is actually a distinct difference between a device (screen) pixel and a pixel that we typically define in <abbr>CSS</abbr>. For example, when the iPhone 4 browser viewport is equal to the device width, 1 <abbr>CSS</abbr> pixel actually translates to 2<abbr title="times">x</abbr>2 device pixels. For those interested, there is a quite old (but very relevant) Webkit article about <a href="http://webkit.org/blog/55/high-dpi-web-sites/">high <abbr>dpi<abbr> websites</abbr></abbr></a>. It makes for an interesting read.</p>
<p>
	This is largely good news for mobile web developers, as very little needs to be done to our mobile <abbr>CSS</abbr> stylesheets for iPhone 4. Device pixels are translated to <abbr>CSS</abbr> pixels automatically. But what about images? Well, this is where some work needs to be done. In order for images to look crisp on the new iPhone 4 display, we now need to serve images that have a higher <abbr>ppi</abbr> than the standard web traditionally uses. To do this, the iPhone 4 (and any other high <abbr>ppi</abbr> device) can be targeted using the following <abbr>CSS</abbr> media query (Notice I have included rules both with and without the -webkit venor prefix):</p>
<pre>
<code>&lt;!-- HIGH PPI DEVICES --&gt;

&lt;link rel=&quot;stylesheet&quot; href=&quot;highres.css&quot; media=&quot;only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)&quot; /&gt;</code></pre>
<p>
	I won&#39;t go into great detail on how to best serve images, but it basically involves creating images that are double the pixel size that you would traditionally need (<abbr title="For example">e.g.</abbr> a 100<abbr title="times">x</abbr>50 pixel image translates to 200<abbr title="times">x</abbr>100 pixels). You can then set the <a href="http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size">background size in <abbr>CSS</abbr></a> so the large images still take up the same number of <abbr>CSS</abbr> pixels as they would on a normal display. <a href="http://blog.iwalt.com/2010/06/targeting-the-iphone-4-retina-display-with-css3-media-queries.html">Walt Dickinson</a> has already written a nice article that has some more info on how to do this. I advise you to go read it. Alternatively, you could inspect the <a href="http://miniapps.co.uk/css/highres.css">highres.css</a> stylesheet on my site here.</p>
<p>
	Finally, one last tip &ndash; you can also test for the same value using using JavaScript:</p>
<pre>
<code>if (window.devicePixelRatio == 2) {

//Targeted code goes here

}</code></pre>]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/targeting-iphone-4-using-css-media-queries/</guid>
<category>CSS</category>
</item>
<item>
<title>Pixel perfect icons for iOS devices using CSS Media Queries</title>
<link>http://miniapps.co.uk/blog/post/pixel-perfect-icons-for-ios-devices-using-css-media-queries/</link>
<pubDate>Fri, 02 Jul 2010 14:26:31 +0100</pubDate>
<description><![CDATA[<p>
	Jesse Dodds has written an excellent article on how to serve <a href="http://notes.jessedodds.com/post/730336221">pixel perfect web clip icons</a> for Apple iOS devices using CSS3 Media Queries. Well worth a look.</p>
<pre>
<code>&lt;!-- iPHONE 3G WEB CLIP ICON --&gt;
&lt;link rel=&quot;apple-touch-icon-precomposed&quot; media=&quot;screen and (resolution: 163dpi)&quot; href=&quot;iOS-57.png&quot; /&gt;
&lt;!-- iPAD WEB CLIP ICON --&gt;
&lt;link rel=&quot;apple-touch-icon-precomposed&quot; media=&quot;screen and (resolution: 132dpi)&quot; href=&quot;iOS-72.png&quot; /&gt;
&lt;!-- iPHONE 4 WEB CLIP ICON --&gt;
&lt;link rel=&quot;apple-touch-icon-precomposed&quot; media=&quot;screen and (resolution: 326dpi)&quot; href=&quot;iOS-114.png&quot; /&gt;</code></pre>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/pixel-perfect-icons-for-ios-devices-using-css-media-queries/</guid>
<category>CSS</category>
</item>
<item>
<title>WKTouch - Multi-touch JavaScript plugin for Apple iOS</title>
<link>http://miniapps.co.uk/blog/post/wktouch-multi-touch-javascript-plugin-for-apple-ios/</link>
<pubDate>Mon, 19 Jul 2010 19:53:02 +0100</pubDate>
<description><![CDATA[<p>
	I&#39;ve just released a little JavaScript plugin called WKTouch up on <a href="http://code.google.com/p/wktouch/">Google Code</a>. It&#39;s a tiny plugin for Apple&#39;s <abbr>iOS</abbr> Safari browser, enabling multi&ndash;touch drag, scale and rotate on <abbr>HTML</abbr> elements.</p>
<p>
	Using the plugin is pretty simple. Firstly, include the main JavaScript file in the header of your <abbr>HTML</abbr> document:</p>
<pre>
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;WKTouch.js&quot; &gt;&lt;/script&gt;</code></pre>
<p>
	Next, add the following <abbr>CSS</abbr> to your stylesheet. Please note, your <abbr>HTML</abbr> element must use absolute positioning:</p>
<pre>
<code>.touch {
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-text-size-adjust: none;
    -webkit-touch-callout: none; 
}

#element1 {
    position: absolute;
    left: 10px;
    top: 10px;
    height:120px; 
    width:120px;
    background-color: blue;
}</code></pre>
<p>
	Now add the class name and <abbr>id</abbr> to your <abbr>HTML</abbr> element:</p>
<pre>
<code>&lt;div class=&quot;touch&quot; id=&quot;element1&quot;&gt;&lt;/div&gt;</code></pre>
<p>
	Finally, in the head of your <abbr>HTML</abbr> file, include the following JavaScript to create a new instance of the plugin, making sure to pass it the <abbr>id</abbr> of your <abbr>HTML</abbr> element:</p>
<pre>
<code>&lt;script type=&quot;text/javascript&quot;&gt; 
window.onload = function() {                     
    var element1 = new WKTouch(&#39;element1&#39;).init();       
};
&lt;/script&gt;</code></pre>
<p>
	That&#39;s it! You can view a fully working <a href="http://miniapps.co.uk/code/wktouch/">online demo here</a> using multiple instances of the plugin on one page. You can also download or checkout the source over on <a href="http://code.google.com/p/wktouch/">Google Code</a>.</p>
]]></description>
<guid isPermaLink="true" >http://miniapps.co.uk/blog/post/wktouch-multi-touch-javascript-plugin-for-apple-ios/</guid>
<category>JavaScript</category>
</item>
</channel>
</rss>