<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>digdug2k</title>
	<atom:link href="http://digdug2k.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://digdug2k.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Mon, 29 Apr 2013 22:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='digdug2k.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>digdug2k</title>
		<link>http://digdug2k.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://digdug2k.wordpress.com/osd.xml" title="digdug2k" />
	<atom:link rel='hub' href='http://digdug2k.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Show Urls in Fennec</title>
		<link>http://digdug2k.wordpress.com/2013/04/29/show-urls-in-fennec/</link>
		<comments>http://digdug2k.wordpress.com/2013/04/29/show-urls-in-fennec/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 05:43:44 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=292</guid>
		<description><![CDATA[One common request we get in Fennec is the ability to show url&#8217;s in the titlebar. At one point I even wrote an addon to do it. Ignoring the arguments for and against, the feature is finally available built in to Nightly builds: To enable, just open Settings -&#62; Privacy and change the &#8220;Title Bar&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=292&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One common request we get in Fennec is the ability to show url&#8217;s in the titlebar. At one point I even wrote an <a href="https://addons.mozilla.org/en-US/mobile/addon/urlfortitle/">addon</a> to do it. Ignoring the arguments for and against, the feature is finally available built in to Nightly builds:</p>
<p><a href="http://digdug2k.files.wordpress.com/2013/04/public1.png"><img class="size-full wp-image" id="i-294" alt="Image" src="http://digdug2k.files.wordpress.com/2013/04/public1.png?w=487" /></a></p>
<p>To enable, just open Settings -&gt; Privacy and change the &#8220;Title Bar&#8221; pref to &#8220;Show page address&#8221;. We&#8217;ve also set up domain highlighting like you see on desktop Firefox (for both regular and private tabs show above, with or without Personas enabled, although Personas are a nice security measure for our new scroll away urlbar too!). Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/292/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=292&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2013/04/29/show-urls-in-fennec/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2013/04/public1.png?w=487" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>HTML5 Context menus in Fennec</title>
		<link>http://digdug2k.wordpress.com/2013/01/07/html5-context-menus-in-fennec/</link>
		<comments>http://digdug2k.wordpress.com/2013/01/07/html5-context-menus-in-fennec/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 19:05:05 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=259</guid>
		<description><![CDATA[Last Friday I landed a patch that enables HTML5 context menus in Firefox for Android nightly builds. That means that demos like this one will now work the same in both desktop Firefox and Firefox for Android now.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=259&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Last Friday I landed a patch that enables HTML5 context menus in Firefox for Android nightly builds. That means that demos like <a href="http://dl.dropbox.com/u/72157/Tests/testContextMenu.html">this one</a> will now work the same in both desktop Firefox and Firefox for Android now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=259&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2013/01/07/html5-context-menus-in-fennec/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>
	</item>
		<item>
		<title>Making great things on the mobile web</title>
		<link>http://digdug2k.wordpress.com/2012/11/28/fixing-your-mobile-web/</link>
		<comments>http://digdug2k.wordpress.com/2012/11/28/fixing-your-mobile-web/#comments</comments>
		<pubDate>Wed, 28 Nov 2012 06:09:00 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Fennec]]></category>
		<category><![CDATA[Webapps]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=230</guid>
		<description><![CDATA[I love Firefox for Android, but find myself frustrated sometimes with the mobile web. I wanted to highlight some great things out there and point out ways you can work to make your (and others) mobile web better! Splendid Apps Twitter has a pretty awesome web app that showcases a lot of what makes the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=230&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I love <a href="http://www.mozilla.org/en-US/mobile/">Firefox for Android</a>, but find myself frustrated sometimes with the mobile web. I wanted to highlight some great things out there and point out ways you can work to make your (and others) mobile web better!</p>
<h3>Splendid Apps</h3>
<p><a href="https://twitter.com/">Twitter</a> has a pretty awesome web app that showcases a lot of what makes the web great. The webapp is designed to <a href="https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag">work well on small screen devices</a> (needs some work on tablets), and makes use of <a href="https://developer.mozilla.org/en-US/docs/IndexedDB">indexedDB</a> to store data and startup up quickly, as well as including visible throbbers (since webapps have no browser chrome to tell users what is happening) and heavy use of <a href="https://developer.mozilla.org/en-US/docs/AJAX">AJAX</a> to load content in the background. They&#8217;ve used t<a href="https://developer.mozilla.org/en-US/docs/DOM/Touch_events">ouch events</a> to implement a nifty pull-to-refresh implementation, have a nice <a href="https://developer.mozilla.org/en-US/docs/CSS/position">fixed position</a> header to provide easy navigation for the site, and use <a href="https://developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history">history apis</a> to make it easy to navigate back and forward between &#8220;screens&#8221; of the app. If you&#8217;ve enabled posting with your location, they&#8217;ll use <a href="https://developer.mozilla.org/en-US/docs/Using_geolocation">Geolocation</a> to identify where you&#8217;re tweeting from. The version of the site they send as their app currently is only lacking support for photo uploads, but they work well if you visit <a href="http://m.twitter.com">http://m.twitter.com</a> in Fennec (i.e. I assume they just haven&#8217;t been uplifted to the webapp yet). In short, its pretty awesome, easy to install, updates faster and more often than apps, and its safe! I&#8217;d highly recommend it to any of our <a href="https://www.mozilla.org/en-US/firefox/channel/#aurora">Aurora</a>/<a href="http://nightly.mozilla.org/">Nightly</a> users. You can install it straight from the <a href="https://marketplace.firefox.com/">Firefox Marketplace</a>! Or just bookmark the website on your Android desktop by loading it in Firefox for Android, long tap on the urlbar, and select &#8220;Add to Homescreen&#8221;.</p>
<p><a href="http://digdug2k.files.wordpress.com/2012/11/twitter.png"><img class="aligncenter size-medium wp-image-253" title="twitter" alt="" src="http://digdug2k.files.wordpress.com/2012/11/twitter.png?w=187&#038;h=300" height="300" width="187" /></a></p>
<h3>Exquisite Hacks</h3>
<p>For those sites that are&#8230; lets say less enlightened&#8230; the great thing about <a href="http://www.mozilla.org/en-US/mobile/">Firefox for Android</a> is you can make the web what you want it to be! <a href="https://developer.mozilla.org/en-US/docs/Extensions/Firefox_on_Android">Writing extensions</a> that extend or change sites is not much different than writing the same extensions for Desktop! Not long ago, a version of <a href="https://addons.mozilla.org/en-US/android/addon/stylish/?src=search">Stylish</a> was even written that works on Firefox for Android, and today I threw up a <a href="http://userstyles.org/styles/79187/fb-mobile?r=1354078462">style on userstyles.org</a> that adds a much needed fixed position header to <a href="http://touch.facebook.com">Facebook.com</a>.</p>
<h4 style="padding-left:30px;">Learning Stuff</h4>
<p style="padding-left:30px;">Unfortunately, Facebook users still can&#8217;t upload photos from the webapp. Facebook currently shows our users a message reading &#8220;Sorry, the browser you&#8217;re using doesn&#8217;t support uploading photos&#8221; along with a sell for their Android app. To be clear to our users, this isn&#8217;t true at all! To all the web developers out there who don&#8217;t know, Firefox for Android already supports <a href="https://developer.mozilla.org/en-US/docs/DOM/Using_the_Camera_API">taking photos right from web pages</a>! All you have to do is add a file input with an accepts attribute set to &#8220;image/*&#8221;. i.e.</p>
<p style="padding-left:30px;">&lt;input type=&#8221;file&#8221; accept=&#8221;image/*&#8221;&gt;</p>
<p style="padding-left:30px;">You can also use &#8220;audio/*&#8221; or &#8220;video/*&#8221; for audio and video uploads respectively (I&#8217;m looking at you <a href="http://www.youtube.com">YouTube</a>!).</p>
<address style="padding-left:30px;"><a href="https://developer.mozilla.org/en-US/docs/WebRTC/navigator.getUserMedia">GetUserMedia</a> can also be enabled in some builds for photo uploads, and video support for <a href="https://developer.mozilla.org/en-US/docs/WebRTC/navigator.getUserMedia">getUserMedia </a>is in the works, but for the simple, &#8220;upload a photo&#8221; case, HTML input&#8217;s are perfect (and will deprecate well in browsers that don&#8217;t support accept attributes).</address>
<p style="padding-left:30px;">I&#8217;ve looked into Facebook a bit and it looks like they&#8217;re depending on some proprietary api&#8217;s (opening a special fbrpc: url) they created for their native apps. Fixing this is definitely doable but is non-trivial hacking that would be fun for someone looking for a fun addon to write! Happy to help anyone interested.</p>
<p>I&#8217; m hoping to keep this up for the next bit, calling out sites or apps that are doing a great job on mobile, and continue to point out things other authors can do to make their mobile pages better. If you know of any you&#8217;re especially impressed with, send &#8216;em my way.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=230&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2012/11/28/fixing-your-mobile-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2012/11/twitter.png?w=187" medium="image">
			<media:title type="html">twitter</media:title>
		</media:content>
	</item>
		<item>
		<title>Testers rock!</title>
		<link>http://digdug2k.wordpress.com/2012/08/27/testers-rock/</link>
		<comments>http://digdug2k.wordpress.com/2012/08/27/testers-rock/#comments</comments>
		<pubDate>Mon, 27 Aug 2012 17:12:39 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=206</guid>
		<description><![CDATA[To everyone who took time out last Friday or over the weekend to test out some webapps on Android goodness, a huge huge HUGE thanks. I wish I could bake you all cookies. We had a great turnout of testers and found a good number of bugs (more still trickling in this morning). Also, people [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=206&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To everyone who took time out <a href="http://aaronmt.com/blog/2012/8/19/discover-and-help-test-web-apps-in-firefox-for-android-on-fr.html">last Friday</a> or over the weekend to test out some <a href="http://digdug2k.wordpress.com/2012/08/24/webapps-on-android-are-comin/">webapps on Android goodness</a>, a huge huge <strong>HUGE</strong> thanks. I wish I could bake you all cookies. We had a <a href="https://twitter.com/AaronMT/status/239189660730003456">great turnout of testers</a> and found a <a href="https://www.bugzilla.mozilla.org/buglist.cgi?resolution=---;component=Web%20Apps;product=Firefox%20for%20Android;list_id=4104933;query_format=advanced">good number of bugs</a> (more still trickling in this morning). Also, people weren&#8217;t shy about sending in the feedback! The <a href="http://dl.dropbox.com/u/72157/Webapp.html">MiniMart</a> still exists (I moved it when Dropbox started to complain, so its available on my <a href="http://people.mozilla.org/~wjohnston/minimarket/Webapp.html">people.mozilla.org</a> account now too) for anyone else who missed out or who wants to continue to test things!</p>
<p>One of the main things people really want (better integration with the Android launcher and Android app management stuff) is going to be tough to do. We&#8217;ve talked about doing things like dynamically building apk&#8217;s and even signing them on a Mozilla server somewhere. That opens up enough other cans of worms that we haven&#8217;t had time to chase yet. Stability and speed are our first priorities.</p>
<p>Thanks again!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=206&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2012/08/27/testers-rock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>
	</item>
		<item>
		<title>WebApps on Android are comin&#8217;!</title>
		<link>http://digdug2k.wordpress.com/2012/08/24/webapps-on-android-are-comin/</link>
		<comments>http://digdug2k.wordpress.com/2012/08/24/webapps-on-android-are-comin/#comments</comments>
		<pubDate>Fri, 24 Aug 2012 04:31:08 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=152</guid>
		<description><![CDATA[I&#8217;ve been fairly heads down the past few weeks working hard to polish up WebApps on Android. And the good news is, its almost there! The next train leaving the beta station will be our first beta shipping with support for the Apps API turned on. You can visit any webapp store on the web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=152&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been fairly heads down the past few weeks working hard to polish up WebApps on Android. And the good news is, its almost there! The next train leaving the beta station will be our first beta shipping with support for the <a href="https://developer.mozilla.org/en-US/docs/DOM/Apps">Apps API</a> turned on. You can visit any webapp store on the web and install apps directly from there. The apps you install will appear on your Android homescreen, and also be available to any app managers that you&#8217;ve given permission to. We have a default App Manager (look in the Android menu for &#8220;Apps&#8221;) we&#8217;re shipping to handle that for now.</p>
<p>WebApps run with their own profiles and in their own processes, like real native apps. They add desktop shortcuts. Show up in the Recent Apps lists. And they have access to pretty much everything you see on Desktop Firefox (including <a href="https://developer.mozilla.org/en-US/docs/Canvas_tutorial">Canvas</a>, CSS <a href="https://developer.mozilla.org/en-US/docs/CSS/transition">Transitions</a> and <a href="https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_animations?redirectlocale=en-US&amp;redirectslug=CSS%2FCSS_animations">Animations</a>, and <a href="https://developer.mozilla.org/en-US/docs/WebGL">WebGL</a>) + some shiny extras like <a href="https://developer.mozilla.org/en-US/docs/DOM/window.screen.lockOrientation">orientation</a> support. (Android security measures prevent putting them in your Android Launcher or modifying the correct App name/icon in the recent apps list.)</p>
<p>At this point, we need testers!</p>
<p><strong>Testing:</strong><br />
Our teams eyes aren&#8217;t enough to hope to find all the problems or test all the devices out there. If you just love the open web and want to try these things out, testing is easy! File bugs (or yell in IRC, email me, reply here, or just tweet at me (DigDug2k)). Install. Start them. Quit them. Restart them. Switch between them. Uninstall them.</p>
<p>We need to know what works, what breaks, what you love and what you hate. There&#8217;s a <a href="http://aaronmt.com/blog/2012/8/19/discover-and-help-test-web-apps-in-firefox-for-android-on-fr.html">Test Day</a> tomorrow (8/24/2012) if you want to help. We&#8217;ll have an irc channel set up, or you can pop in to #mobile. BUT, you can test any time! In fact, I&#8217;d love users to keep using these things and to get some testing over more prolonged use. Some quick ways to install apps:</p>
<ol>
<li>The <a href="http://marketplace.mozilla.org">Mozilla marketplace</a> isn&#8217;t quite open yet, but is available to registered <a href="https://mozillians.org/en-US/">Mozillians</a>. You get their either by going to <a href="http://marketplace.mozilla.org">http://marketplace.mozilla.org</a> in <a href="https://www.mozilla.org/en-US/mobile/beta/">Firefox Beta for Android</a>, or through the Apps Manager (Android Menu -&gt; Apps -&gt; Click the shopping bag in the top right).</li>
<li>Since the market is still under active development, I put together something I call &#8220;<a href="http://dl.dropbox.com/u/72157/Webapp.html">Mini-Market</a>&#8221; for testing as well. It contains a few curated apps that we consider ready for testing. If you&#8217;re interested you can play with it at <a href="http://bit.ly/minimart">http://bit.ly/minimart</a> (WARNING: You will find bugs!). If you&#8217;ve got a great app you want me to add, drop me a line here. I&#8217;ll try to blog more about it in a bit.</li>
<li>Alternatively, if you run a site that is a webapp, you can serve up an app the through the <a href="https://developer.mozilla.org/en-US/docs/DOM/Apps">apps API</a> all by yourself. Trust me, no one enjoys huge &#8220;Install our Android App!&#8221; banners thrown in their faces when they&#8217;re trying to view your site, but I wouldn&#8217;t be surprised to see users using a well placed (not intrusive) &#8220;One-Click Install&#8221; button!</li>
</ol>
<p><strong>Writing an app:</strong></p>
<p>There&#8217;s a lot to write about WebApp development (Note we don&#8217;t have to write Mobile WebApp because its pretty easy to write a webapp that runs well on all sorts of devices!). That&#8217;s a different blog post But I have noticed a few tips from testing a lot of apps:</p>
<ol>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag">metaviewport</a>. It won&#8217;t affect your site on desktop. It makes things usable on mobile. Use it!</li>
<li>Along with that, now that your site isn&#8217;t being rendered at desktop sizes on phones, you can use <a href="https://developer.mozilla.org/en-US/docs/CSS/Media_queries">media queries</a> for responsive design too! And Firefox has a pretty awesome <a href="http://paulrouget.com/e/devtoolsupdate/">Responsive Design tool</a> built in. The mini market uses some <a href="https://dl.dropbox.com/u/72157/mobileapp.css">really simple ones</a> to give a two pane view on tablets/desktop and a one pane version on phones.</li>
<li>Webapps have no chrome around them. You are responsible for showing progress if the user clicks a link or does something slow. Use <a href="https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest">XMLHttpRequest</a> if you can. Plus, that should make it easier for you to build your own cache of responses and make your app super responsive. Desktop apps do it. Webapps need to start doing it too.</li>
<li>If you do load content dynamically into a single page, use the <a href="https://developer.mozilla.org/en-US/docs/DOM/window.history">history API</a>! All Android phones have a back button, and this makes it work!</li>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache">App-Cache</a>. I need to get some data here, but completely unscientific testing on my half with really bad mobile networks has shown apps taking 10-15 seconds to start, most of which is waiting on the network. The few (a.k.a. the one admittedly simple) app I&#8217;ve seen using App Cache is much faster.</li>
</ol>
<p>Once you have a simple app built. Installing it is easy. You just to create an app manifest. There are some instructions and boilterplate for doing that <a href="https://developer.mozilla.org/en/Apps/Manifest">here</a>. The <a href="http://testmanifest.com/">test manifest builder</a> is also helpful if you want some boiler plate. Its mostly a simple JSON file you need to serve from the same host as your app. You can submit that manifest to the Mozilla Marketplace (or any other store&#8217;s that appear) if you want to use it for discoverability, or you can give users a link to install it from your site by simply calling</p>
<p><a href="https://developer.mozilla.org/en/DOM/Apps.install">navigator.mozApps.install</a>(&#8220;path/to/manifest.webapp&#8221;)</p>
<p>Thats about it. Happy testing! Once again, please provide us feedback however you can. We&#8217;re listening and we&#8217;re anxious to make the web a first class citizen for apps.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=152&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2012/08/24/webapps-on-android-are-comin/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting taps using touch events</title>
		<link>http://digdug2k.wordpress.com/2012/07/10/detecting-taps-using-touch-events/</link>
		<comments>http://digdug2k.wordpress.com/2012/07/10/detecting-taps-using-touch-events/#comments</comments>
		<pubDate>Tue, 10 Jul 2012 21:05:31 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=86</guid>
		<description><![CDATA[We recently shipped our first release of Firefox for Android with full multi-touch touchevents support, and I&#8217;d like to keep hearing from people if they find bugs or sites that don&#8217;t work. I recently had to debug and fix (for a second time) a bug involving Google maps, touch events, and tap detection. I thought [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=86&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We recently shipped our first release of <a href="https://play.google.com/store/apps/details?id=org.mozilla.firefox">Firefox for Android</a> with full multi-touch touchevents support, and I&#8217;d like to keep hearing from people if they find bugs or sites that don&#8217;t work. I recently had to debug and fix (for a second time) a bug involving <a href="https://maps.google.com/">Google maps</a>, <a href="https://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html">touch events</a>, and tap detection. I thought it might be worth blogging here as well for future authors looking at this problem. Plus, Maps code is super obfuscated which made it tough to find the problem (both times).</p>
<p><em>Sidenote to try and avoid questions: Our users also don&#8217;t get some other nice Google Maps features like pinch-zoom and nice looking buttons. We fully support multitouch touch events in Firefox for Android, and pinch zoom works (last I checked) if you change your UA to match the stock browser or iPhone. The CSS problems are mostly due to the use of -webkit-background-size without other vendor prefixes.</em> <em>If someone wants to port <a href="http://userstyles.org/">Stylish</a> to Fennec, it&#8217;d be a start to a prettier Google Maps experience for many of our users!</em></p>
<p>The Maps devs at some point realized they had all this nice code written to handle mouse events for their setup, and wanted to reuse it as much as possible. Ideally, touchevents and mouseevents would be interchangable and things would just work, but this is the system we&#8217;re kinda stuck with now. So the Maps team built functions that take touch events, convert them to mouse events, and rebroadcast them:</p>
<pre>var sendConvertedTouch = function (eventType, touchEvent) {
  if (1 != b.changedTouches.length) return k;
    var mouseevent = document.createEvent("MouseEvents"),
             touch = b.changedTouches[0];
    c.initMouseEvent(eventType, true, true, window, true,
                     touch.screenX, touch.screenY,
                     touch.clientX, touch.clientY,
                     l, l, l, l, 0, null);
    c.translated = true;
    touch.target.dispatchEvent(mousevent);
  }
}</pre>
<p>I doubt this is crazy performant, but it works! I&#8217;m guessing there are similar hacks all around the webs. This makes sending mouseup/down/move events simple.</p>
<p>It takes a bit more work to actually fire clicks when the user taps. There&#8217;s numerous tools and utilities out there to help with these things. But in this case the team decided to do their own thing. A super simplified version of the result looks something like:</p>
<pre>var dragging = false;
document.addEventListener("touchmove", function(event) {
  dragging = true;
}, false);

document.addEventListener("touchend", function(event) {
  if (!dragging)
    sendConvertedTouch("click", event);
  dragging = false;
}, false);</pre>
<p>(in their case, dragging actually holds a count of the number of taps).</p>
<p>This fails in current builds of Fennec. Why? Well essentially we don&#8217;t do a whole lot of filtering on the input we send to content. The system sends us a touch event, we send it on to content (we do some event coalescing if our internal event handling/drawing is slow the entire system doesn&#8217;t get backed up, but that&#8217;s about it). But touches on a screen actually jitter quite a bit especially on hdpi devices. Even when it feels like your finger is completely stationary, you&#8217;re probably still sending tons of touchmove events to the pages you&#8217;re viewing. So even though your finger hasn&#8217;t moved far, we send a touchmove event and maps refuses to click.</p>
<p>In addition, Fennec actually supports some of the Level 2 draft for touch events, which includes things like force and radius (NOTE: This spec is still in development and is likely to change, so use those with caution). So if a user presses on a single spot on the screen and then continues pressing harder and harder, we fire touchmove events for all those force/radius changes even though the users finger is still at (approximately) the same place.</p>
<p>All of that means the above code doesn&#8217;t actually work for us unless we filter out at least this very first touchmove event and don&#8217;t fire it until the user has actually moved their finger a significant distance on the screen. For now, that&#8217;s what we&#8217;ve done to make maps work for our users.</p>
<p>The correct code should check for some minimum distance after the initial touchstart event. If you get a touchmove that&#8217;s further away than that, you&#8217;re dragging! Ideally you&#8217;d have access to the device dpi here and you could use units of mm or something, but I can&#8217;t find a webapi for device dpi (yet?). This post is already getting too long, so I&#8217;ll leave that as an exercise to the reader.</p>
<p>&#8220;tap&#8221; events with some sort of number indicating how many taps have occurred in approximately the same place would probably be a useful addition to the touch events spec. (I noticed the other day that we actually have an internal MozGestureTap event that isn&#8217;t implemented in Fennec and isn&#8217;t exposed to web content (yet)). For now the EASIEST way to get around some of these problems is to use something like <a href="http://zeptojs.com/">zepto</a>, <a href="http://jquerymobile.com/">jquerymobile</a>, or <a href="https://github.com/borismus/pointer.js">pointer.js</a> which abstract this and other useful &#8220;gestures&#8221; for you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=86&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2012/07/10/detecting-taps-using-touch-events/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>
	</item>
		<item>
		<title>Porting Cleary to Native Fennec</title>
		<link>http://digdug2k.wordpress.com/2012/05/19/porting-cleary-to-native-fennec-2/</link>
		<comments>http://digdug2k.wordpress.com/2012/05/19/porting-cleary-to-native-fennec-2/#comments</comments>
		<pubDate>Sat, 19 May 2012 01:43:29 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=72</guid>
		<description><![CDATA[I&#8217;ve had some requests to port Cleary over to Native Fennec (aka the hot new Beta for Android), and thought it would be a good chance to blog about addons in the native Fennec world. Cleary is a pretty simple addon (based on mfinkle&#8217;s BootstrapJones tutorials) that gave Fennec some more advanced clear history options, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=72&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had some requests to port <a href="https://addons.mozilla.org/en-US/mobile/addon/cleary/">Cleary</a> over to <a href="https://play.google.com/store/apps/details?id=org.mozilla.firefox_beta">Native Fennec</a> (aka the hot new Beta for Android), and thought it would be a good chance to blog about addons in the native Fennec world. Cleary is a pretty simple addon (based on mfinkle&#8217;s <a href="http://starkravingfinkle.org/blog/2011/01/bootstrap-jones-adventures-in-restartless-add-ons/">BootstrapJones</a> <a href="http://starkravingfinkle.org/blog/2011/01/restartless-add-ons-more-resources/"> tutorials</a>) that gave Fennec some more advanced clear history options, like the ability to only clear certain things:</p>
<ol>
<li>History (cache,history,downloads,formdata)</li>
<li>Passwords (cookies,passwords,sessions,syncAccount)</li>
<li>Site Preferences (offlineApps,geolocation,siteSettings)</li>
</ol>
<p>and only clear them for certain time frames (One hour, Two hours, Four hours, a Day, and Forever). Porting it gives a chance to show off some new things we can do. Turned out, porting it was really easy though. In fact, a lot of the code it was using in XUL Fennec isn&#8217;t even necessary anymore thanks to some additions to the platform! Quick overview:</p>
<h2>Step One: Updating compatibility</h2>
<p>This steps pretty easy. We just need to mark Cleary as compatible on our install.rdf</p>
<pre>&lt;em:targetApplication&gt;
  &lt;Description&gt;
    &lt;em:id&gt;{aa3c5121-dab2-40e2-81ca-7ea25febc110}&lt;/em:id&gt;
    &lt;em:minVersion&gt;14.0b1&lt;/em:minVersion&gt;
    &lt;em:maxVersion&gt;15.0&lt;/em:maxVersion&gt;
  &lt;/Description&gt;
&lt;/em:targetApplication&gt;</pre>
<h2>Updating our UI</h2>
<p>Cleary (luckily), is a bootstrapped extension and doesn&#8217;t include any overlays. While you could potentially use an overlay in Native Fennec, I&#8217;d highly discourage addon authors from doing it.</p>
<p>So to update our UI here basically means altering some scripts so that they only run on XUL Fennec. I decided an easy way to do that here was just to check the app id:</p>
<pre>if (Services.appInfo.ID == "{a23983c0-fd0e-11dc-95ff-0800200c9a66}") {
  // setup xul fennec
} else {
  // do nothing!
}</pre>
<p>Inside here the XUL Fennec code creates some buttons and rows for the Preferences pane. Overlaying things into prefs isn&#8217;t possible in Native yet, so we can basically do nothing! In some cases you might opt to use our <a href="http://starkravingfinkle.org/blog/2011/11/firefox-android-add-ons-in-a-native-world/">NativeWindow</a> interface to add UI elements. Instead, I&#8217;m opting to include some <a href="https://developer.mozilla.org/en/Extensions/Inline_Options">inline options</a> for the addon.</p>
<p><code>settings.xul</code> also happened to already be in Cleary. I just used some trickery to display it in the normal settings list. It also included some things we didn&#8217;t want, like a &lt;settings&gt; element, which I&#8217;m pretty sure Native Fennec will not like, so I removed that and just created a new <a href="http://dl.dropbox.com/u/72157/cleary/options.xul"><code>options.xul</code></a> in the root of the addon.</p>
<p>We also need to re hook up our click listeners to the clear buttons in the dialog. This requires a fix for Fennec that hopefully we can push into the beta. In bootstrap.js we need to add a listener for &#8220;addon-options-displayed&#8221; notifications:</p>
<pre>Services.obs.addObserver(observer, "addon-options-displayed", false)</pre>
<p>and a little observer to see them trigger:</p>
<pre>var observer = {
  observe: function(aSubject, aTopic, aData) {
    if (aTopic == "addon-options-displayed" &amp;&amp; aData == "cleary@digdug.org") {
      var doc = aSubject;
      var control = doc.getElementsByClassName("clearButton");
      for (var i = 0; i &lt; control.length; i++) {
        var c = doc.defaultView.gChromeWin.cleary;
        control[i].addEventListener("command", c.doClear.bind(c), false);
      }
    }
  }
};</pre>
<p>The old <code>settings.xul</code> was also localized using some JS trickery, which won&#8217;t work now. BUT!!! bootstrapped addons now support a <a href="https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions#chrome.manifest_in_bootstrapped_add-ons"><code>chrome.manifest</code></a> file, so we can add it and save ourselves some work. At the same time, I can remove a bunch of junk I had to register a resource URL and load style sheets. Yay for simplifying! We just add a chrome.manifest file with:</p>
<pre>content cleary content/
locale cleary en-US locales/
style chrome://browser/content/browser.xul chrome://cleary/content/dialog.css</pre>
<h2>Functionality</h2>
<p>Most of the functionality we previously had will just work in Native Fennec. Passwords, Form history, Cache, Cookies, Downloads, etc. All of its the same (and the same as desktop).</p>
<p>Except! browsing history is no longer handled in Gecko at all. Its all done in Java. Eventually Fennec should expose an interface for this, ideally that one that mirrors <a href="https://developer.mozilla.org/en/nsIBrowserHistory">nsIBrowserHistory</a>. I filed <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=731888">bug 731888</a> awhile ago for a slightly less hacky fix as well, but need to put up a correct patch there (volunteers welcome!).</p>
<p>For now, I had to hack into the database. This is <strong>NOT</strong> recommended. It will probably break eventually, and it will definitely make kittens cry but you can open the history database using the <a href="https://developer.mozilla.org/en/Storage">mozStorage</a> service and tinker around in it. That may crash some phones where Android&#8217;s sqlite assuredly won&#8217;t match Gecko&#8217;s, so be warned! For history I added:</p>
<pre>let file = FileUtils.getFile("ProfD", ["browser.db"]);
let dbConn = Services.storage.openDatabase(file);
if (this.range) {
  var statement = dbConn.createStatement("DELETE FROM history WHERE :from_date &lt;= date AND date &lt;= :to_date "
  statement.params.from_date = this.range[0];
  statement.params.to_date = this.range[1];
  statement.executeAsync();
} else {
  dbConn.executeSimpleSQL("DELETE FROM history");
}</pre>
<p><a href="http://digdug2k.files.wordpress.com/2012/05/device-2012-05-18-183239.png"><img class="aligncenter size-medium wp-image-76" title="Screenshot of new Cleary" src="http://digdug2k.files.wordpress.com/2012/05/device-2012-05-18-183239.png?w=168&#038;h=300" alt="" width="168" height="300" /></a></p>
<p>And we&#8217;re done! There&#8217;s a build with this on Dropbox <a href="http://dl.dropbox.com/u/72157/cleary/cleary.xpi">here</a>, but it will not work until <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=756689">bug 756689</a> is fixed an checked in (and be warned its not on AMO because I&#8217;m still testing! Dataloss definitely possible!) There&#8217;s some bugs here I need to look into (clicks in the options dialog seem to fire multiple times and there&#8217;s some oddity with menulists), and I haven&#8217;t tested on XUL Fennec yet. For things that delete your data, there&#8217;s always lots and lots and LOTS of testing to do. But for the most part the port was pretty easy.</p>
<p>I&#8217;m pumped about Native Fennec. Its a great browser, and having extensions work in it is just icing on the cake. I&#8217;m excited to see what some good add-on developers can come up with to do with it in order to fix and enhance the mobile web.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=72&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2012/05/19/porting-cleary-to-native-fennec-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2012/05/device-2012-05-18-183239.png?w=168" medium="image">
			<media:title type="html">Screenshot of new Cleary</media:title>
		</media:content>
	</item>
		<item>
		<title>Downloadable Locales in Fennec</title>
		<link>http://digdug2k.wordpress.com/2011/09/30/downloadable-locales-in-fennec/</link>
		<comments>http://digdug2k.wordpress.com/2011/09/30/downloadable-locales-in-fennec/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 21:15:21 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=51</guid>
		<description><![CDATA[A new Firefox Mobile Aurora build has left, and with it the Locale Picker! We noticed during development of Firefox Mobile that we were a bit larger than some other Android apps. We&#8217;ve written about why that is before, but one thing that&#8217;s eating up space in that little .apk file is locales. Android doesn&#8217;t let [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=51&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A new Firefox Mobile Aurora build has left, and with it the Locale Picker!</p>
<p>We noticed during development of Firefox Mobile that we were a bit larger than some other Android apps. We&#8217;ve written about why that is <a href="http://limpet.net/mbrubeck/2010/10/04/why-fennec-is-different.html">before</a>, but one thing that&#8217;s eating up space in that little .apk file is locales. Android doesn&#8217;t let us filter what you download based on language (although they&#8217;ve started to add more options that way). So for our past few releases, we&#8217;ve put out a multi-locale version. At run-time, we look at which language your system is in. If we have it, we use it. Unfortunately, we can&#8217;t ship every language we support.</p>
<p>To get around this we&#8217;ve been working on a mechanism to let you download your favorite locale dynamically. Recently the last piece of this landed for users on our <a href="http://nightly.mozilla.org/">Nightly</a> and <a href="http://www.mozilla.org/en-US/firefox/channel/">Aurora</a> channels to start testing. To turn this on, you need to point Firefox Mobile to a list of downloadable locales compatible with your version. Eventually, this will come from AMO, but I&#8217;ve put up temporary lists at:</p>
<ul>
<li>Nightly Build Users: <a href="http://people.mozilla.org/~wjohnston/nightly_locales.xml">http://people.mozilla.org/~wjohnston/nightly_locales.xml</a> ( <a href="http://bit.ly/qgsFqF">http://bit.ly/qgsFqF</a> )</li>
<li>Aurora build Users: <a href="http://people.mozilla.org/%7Ewjohnston/aurora_locales.xml">http://people.mozilla.org/~wjohnston/aurora_locales.xml</a> ( <a href="http://bit.ly/nBICkw">http://bit.ly/nBICkw</a> )</li>
</ul>
<p>To use these lists:</p>
<ol>
<li>Open about:config</li>
<li>Search for the pref &#8220;extensions.getLocales.get.url&#8221; (it should show up if you search for &#8220;locales&#8221;)</li>
<li>Change the pref to one of the above links (now that we support copy and paste, it might be easier to just open them and copy and paste it from the urlbar).</li>
<li>You&#8217;ll have to restart Fennec for this pref to take effect (fixed in nightly &#8211; bug <a title="NEW - Changing localepicker getLocales pref should not require a restart" href="https://bugzilla.mozilla.org/show_bug.cgi?id=689702">689702)</a></li>
</ol>
<p>Everything should continue like normal, but now when you go into our preferences section and select to change your locale, you will (after a second to download) see a list of downloadable locales. You can then pick the locale you want, click &#8220;Continue&#8221;, and the locale will be downloaded, installed, and set up for you automatically. Because these locales are actually distributed as add-ons, using them right now requires a restart of the browser (although we&#8217;re going to remove that soon), and voila! you should have Firefox  in the language of your choice.</p>
<h2><a href="http://digdug2k.files.wordpress.com/2011/09/drawing.png"><img class="aligncenter size-full wp-image-55" title="LocalePickerFlow" src="http://digdug2k.files.wordpress.com/2011/09/drawing.png?w=500&#038;h=236" alt="Flow of the Fennec locale picker" width="500" height="236" /></a>The Update problem</h2>
<p>There are some things to worry about here. Nightly builds of Firefox Mobile are not string frozen. New strings can appear or disappear from day to day, and if you&#8217;re using a locale with missing strings, that can lead to a completely broken version (aka the yellow screen of death). To help avoid this, we disable the installed locales each day before we update, and try to download a new version if its available. Aurora users shouldn&#8217;t be seeing string breakage from day to day (Aurora is string frozen), but this is the time we encourage localizers to start updating their locales, so Aurora users should see the same disable and update occurring each day when they update.</p>
<p>When this feature moves to Beta and Release builds of Firefox Mobile , we distribute updates through the Android Market. This means that our updater code never runs to disable and update add-ons, but because the locales are only marked compatible with one particular build of Firefox, they&#8217;ll be marked incompatible by the Add-ons Manager. To help keep this from becoming to annoying, we also try to update any locales marked disabled by the add-ons manager each startup as well.</p>
<p>The last few pieces of this just recently landed, and its time to start letting our Nightly and Aurora users beat on the feature to test it out. Feel free to use the above prefs and localization files, and try Firefox Mobile out in a new language. Find problems. <a href="https://bugzilla.mozilla.org/">Report bugs</a> (or <a href="mailto:wjohnston@mozilla.com">email me</a>, or send us a message in the <a href="irc://irc.mozilla.org/mobile">#mobile</a> channel on IRC). If your language isn&#8217;t available, <a href="http://guides.mozilla.org/Localization">feel free to jump in and help</a>! Help us make sure that Firefox is great for users on mobile devices in every language. Thanks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=51&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2011/09/30/downloadable-locales-in-fennec/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2011/09/drawing.png" medium="image">
			<media:title type="html">LocalePickerFlow</media:title>
		</media:content>
	</item>
		<item>
		<title>Touch Events in Fennec Nightly Builds</title>
		<link>http://digdug2k.wordpress.com/2011/05/02/touchevents/</link>
		<comments>http://digdug2k.wordpress.com/2011/05/02/touchevents/#comments</comments>
		<pubDate>Mon, 02 May 2011 16:44:23 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=27</guid>
		<description><![CDATA[This past Friday we checked in the initial frontend patches to Fennec to turn on single-touch TouchEvents in the mobile browser. As a result, you can now pan around on sites like Google or Bing Maps in Fennec! Apple added support for touchevents in mobile Safari early in the iPhone&#8217;s lifetime, but the W3C TouchEvent [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=27&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This past Friday we checked in the initial frontend patches to Fennec to turn on single-touch TouchEvents in the mobile browser. As a result, you can now pan around on sites like <a href="http://maps.google.com/">Google</a> or <a href="http://www.bing.com/maps/">Bing Maps</a> in Fennec! Apple added support for touchevents in mobile Safari early in the iPhone&#8217;s lifetime, but the W3C <a href="https://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html">TouchEvent specification</a> has only recently starting coming together. <a href="https://developer.mozilla.org/en/DOM/Touch_events">Mozilla&#8217;s</a><a href="https://developer.mozilla.org/en/DOM/Touch_events"> mozTouchEvents</a> will likely be deprecated in favor of the W3C standard specification.</p>
<p><a href="http://digdug2k.files.wordpress.com/2011/05/calgary1.png"><img class="aligncenter size-medium wp-image-39" title="calgary" src="http://digdug2k.files.wordpress.com/2011/05/calgary1.png?w=300&#038;h=270" alt="" width="300" height="270" /></a>Touchevents are necessary on browsers designed to be used with your fingers like Fennec. Our panning and double tap detection can make it difficult to forward typical mousedown, mouseup, and mousemove events to the client in a timely manner. For instance, in Fennec, we currently set the <code>active</code> pseudoclass on elements when they are first tapped (and use it for tap highlighting). If the user lifts their finger, without moving it very far from the initial mousedown, we wait a short time to make sure there isn&#8217;t a second (&#8216;double&#8217;) tap, and if not we fire <code>mousedown</code>, <code>mouseover</code>, <code>mouseup</code>, and <code>click</code> simultaneously on the element. The delay makes it impossible to create pages that quickly respond to user input.</p>
<p>To help with this, in Fennec 4 we removed the time spent waiting for a double tap if the page has disabled user scaling in the metaviewport tag. This allows the page to quickly receive click events, but since we pan the page as your finger moves, we still couldn&#8217;t send <code>mousemove</code> events to the client. Touchevents provide the bridge between the two modes of interaction. Instead of registering for <code>mouse</code> events pages can register for <code>touchstart</code>, <code>touchmove</code> and <code>touchend</code> events. These seem very similar to typical mouse events, but have a few key differences. Touchevents don&#8217;t contain clientX/Y, pageX/Y etc coordinates directly on the event. Instead, the mouse coordinates are stored as an array of touchpoints and added to the touches property of the event. So, for instance, to use just the first touch or an event, you can call:</p>
<pre>window.addEventListener("touchstart", function(aEvent) {
  var x = aEvent.touches[0].clientX;
  var y = aEvent.touches[0].clientY;
}, true);</pre>
<p>In addition, touchevents also target themselves differently than regular mouse events. While touchdown is fired on the initially touched element, <code>touchmove</code> events will always remain targetted at that same target, even if the user moves their finger onto a different element. So if you want to write touchevents to drag an object around the screen, you can register a touchdown and touchmove listener on the object, and you will always receive the move events on the object, even if the user moves their finger onto a different element on the page. That&#8217;s how <a href="http://www.quirksmode.org/m/tests/drag.html">this example</a> from quirksmode works.</p>
<p><a href="http://digdug2k.files.wordpress.com/2011/05/drag.png"><img class="size-medium wp-image-31 aligncenter" title="drag" src="http://digdug2k.files.wordpress.com/2011/05/drag.png?w=300&#038;h=293" alt="" width="300" height="293" /></a></p>
<p>When a page registers touchevents we attempt to detect it in the Fennec chrome and disable panning until the page has had  its chance to handle touchmove events. If the page author decides to call <code>preventDefault</code> on either <code>touchstart</code> or on the very first <code>touchmove</code> event, it will prevent Fennec from panning the page (we still allow panning the sidebars and urlbar off of the page, but will not allow you to pan them back on). It will also prevent any clicks that would normally be fired. This can pose a problem for Fennec where panning the page is necessary in order to gain access to the urlbar, and to the tab- and control-sidebars.</p>
<p>In order to continue to allow you to access the UI, and still allow pages to allow complex touchevents, we&#8217;ve currently implemented two escape hatches into Fennec:</p>
<ol>
<li>Pressing the menu button will show the urlbar, allowing you to move to a different page</li>
<li>Pans starting at the very top of the page (within the top 1/2 inch) can not stop the panning of chrome</li>
</ol>
<p>These will always bring in the chrome, and so you can trust that they are showing valid content.</p>
<p>Single-touch events are supported in nightly builds of Fennec (<a href="https://wiki.mozilla.org/Mobile/Platforms/Android">Android</a> &#8211; <a href="http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/">other platforms</a>) and should ship (fingers crossed) with Fennec 6. Support for multi-touch on Android is currently targeted at Fennec 7. Feedback is welcome. In particular, we&#8217;d like to ensure that turning these on hasn&#8217;t introduced noticeable regressions in panning for anyone, or if you can find places where our handling of preventDefault doesn&#8217;t agree with what is present in other modern mobile browsers. Test them out. Enjoy! <a href="http://maps.google.com/">Google Maps</a> is likely the primary place where you will notice the work (NOTE: Maps has display problems partly due to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=598736">scaling issues</a> in Fennec, and partly because of Google&#8217;s use of webkit prefixed css without providing fallbacks for other browsers). I wrote a quick (and buggy) <a href="http://dl.dropbox.com/u/72157/paint/paint.html">finger painting program</a> to demo as well, but we&#8217;re excited to see what kind of nifty web applications and games people use this stuff for!</p>
<p><a href="http://digdug2k.files.wordpress.com/2011/05/fennec.png"><img class="aligncenter size-medium wp-image-34" title="Fennec" src="http://digdug2k.files.wordpress.com/2011/05/fennec.png?w=300&#038;h=139" alt="" width="300" height="139" /></a></p>
<p>Special thanks to <a href="http://limpet.net/mbrubeck/">Matt Brubeck</a> and Olli Pettay for their hard work within the WebEvents work group. Olli (smaug) also implemented the backend pieces necessary for Fennec to support touchevents. Matt has been hard at work documenting how touchevents work in different mobile browser (hint: they&#8217;re not all the same), and filing/fixing bugs to help us continue to bring Fennec&#8217;s implementation inline with as many as possible.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=27&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2011/05/02/touchevents/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2011/05/calgary1.png?w=300" medium="image">
			<media:title type="html">calgary</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2011/05/drag.png?w=300" medium="image">
			<media:title type="html">drag</media:title>
		</media:content>

		<media:content url="http://digdug2k.files.wordpress.com/2011/05/fennec.png?w=300" medium="image">
			<media:title type="html">Fennec</media:title>
		</media:content>
	</item>
		<item>
		<title>Mozilla!</title>
		<link>http://digdug2k.wordpress.com/2011/03/25/mozilla/</link>
		<comments>http://digdug2k.wordpress.com/2011/03/25/mozilla/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:22:42 +0000</pubDate>
		<dc:creator>digdug2k</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://digdug2k.wordpress.com/?p=24</guid>
		<description><![CDATA[This is my first post as a Mozilla blog.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=24&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is my first post as a Mozilla blog.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/digdug2k.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/digdug2k.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=digdug2k.wordpress.com&#038;blog=19823411&#038;post=24&#038;subd=digdug2k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://digdug2k.wordpress.com/2011/03/25/mozilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b94acb47c03f36bd21368c03f7fe71c9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digdug2k</media:title>
		</media:content>
	</item>
	</channel>
</rss>
