Introducing Tab Queue in Firefox for Android

We’ve known for a long time that the average user attention span on mobile is incredibly short; the longer content takes to load, the higher the chance the user will give up. No wonder so much emphasis is placed on load times and the pursuit to get something in front of the user as fast of possible. It ridiculous to think that such great leaps have been made in the world of mobile computing but loading web content on mobile can still be a slow and frustrating experience.

Chris Lacy wrote about a few of the issues surrounding mobile web browsing when he announced Link Bubble in March 2014. Link Bubble loads web pages in the background, providing a minimal user interface to give progress feedback to the user and a way of viewing the content once it’s loaded. It’s a great concept: rather than attempting to fix slow load times; accept that mobile browsing can be slow and work around it. Chris didn’t improve browser performance or provide any page load optimisation but he managed to push mobile web browsing to a new level by removing the point of friction between the user and the inherent issues of the platform.

Inspired by Chris’ work, Anthony Lam and I started thinking about how we could apply a similar thought process to Firefox. In line with our other ongoing work around continuity, we wanted to give users a way of using Firefox which feels more natural and stops them having to work around limitations of the browser. We came up with the idea of a tab queue which will allow users to effortlessly queue up multiple sites of interest and open them at a later time.  

Tab queue notificationThe feature is currently available in our nightly builds for Android. It’s early days and there’s still work to be done before we remove the nightly flags, but we’d love to hear your thoughts, comments and suggestions. For more info check out Anthony’s post about Tab Queue which has more details of the implementation and UX considerations.  You can keep track of the work we’re doing of this front by visiting the Bugzilla page.

Read More

Accepting incoming tcp ip connections in (K)ubuntu

I’ve recently spent a bit of time trying to work out why I could accept incoming connections on my Kubuntu laptop. Initially I tried to get Charles to work but couldn’t get it to see any traffic coming from my Android phone – I put it down as a bug in Charles and left it. Today I tried to get Synergy working and again nothing, which prompted me to investigate further. I know Synergy was working on my laptop as a client, but I was trying to make it a server today, and it wasn’t showing anything being able to connect. This sounded very much like I was behind a firewall – but to the best of my knowledge I don’t have a firewall on my laptop. Anyway, turns out the ports were closed and the following command allowed me to open them (24800 for Synergy, Charles works on port 8888):

sudo iptables -I INPUT -p tcp --dport 24800 -j ACCEPT

Read More

Time to update your support library

Fragmentation is an often cited issue of the Android ecosystem, but the people who really bear the brunt of it are not so much the end users, but the developers who have to create applications to support multiple versions of the platform. It’s for this reason Google created the Android Support Library – used to provide backwards compatibility for newer features of Android.

Originally released in March 2011, just after the introduction of fragments in Honeycomb (Android 3.0), the support library (originally called the “Android Compatibility package”) provided developers the means to use Fragments, LoaderManagers and a few other classes across mostly all versions of the platform, going back to Donut, version 1.6. This library, combined with the excellent ActionBarSherlock , gives developers the means to write a single codebase which can support multiple versions of the platform without having to write platform specific code – the only exception that comes to mind being the ActionBar action view widgets which need specific pre-ICS implementations.

Fast forward a couple of years to Google I/O 2012 and the, now named, Support Library is on revision 9 and has brought with it a lot of updates. Google is slowly implementing functionality which has, up until now, been developed by other people. For example, revision 9 includes a lot of bug fixes and new functionality to the ViewPager class, however note currently the ViewPageIndicator library still offers better functionality. The Notification Builder has also been updated, but again note that a third party library, in the form of the NotificationCompat2 library, is still the recommended way to provide complete support for notifications across all platform versions without sacrificing the newer functionality where available.

Of particular interest, and the reason for the title of this blog post, are the ‘many bug fixes’ for the Fragment class, which by now should be core building blocks used by all Android developers (if you aren’t using them yet – what are you doing?!) – this in itself should be reason enough to update.

Google seems to update Android everytime it release a new Nexus device, and if the rumour-mill is correct then we should be seeing a new Nexus handset at some point towards the end of the year. If past updates are anything to go by, Google should be releasing another updated version of the Support Library sometime in August 2012 or shortly after. It’s strongly adviced to keep an eye on the Support Library updates and implement new versions as soon as they’re released in order to take advantage of the new features and bug fixes.

Read More

How to get ADB to work with the Lenovo Thinkpad Tablet in Windows 7

Lenovo has a dedicated driver for the Lenovo Thinkpad Tablet, so it won’t work out of the box.

Here’s the steps to get it working:

  1. Download the ADB Interface Driver – ThinkPad Tablet from
  2. Turn on the ThinkPad Tablet.
  3. Press the slider bar icon to display the Settings property page.
  4. Press Applications on the left side of the page.
  5. Press Development and check USB debugging.
  6. Press the OK button on the dialog.
  7. Connect the Tablet to the computer.
  8. Open Device Manager.
  9. Expand the Other devices node.
  10. Right click the ThinkPad Tablet node and select Update Driver Software.
  11. Select Browse my computer for software.
  12. Browse to the folder that contains the driver files.
  13. Select the driver folder and continue the driver installation

Read More

Making Gmail Tap

This morning my brother posted a message on Google+ about Gmail Tap – Google’s April Fools joke this year. I looked at it and though “I can do that” – so I did. Here’s the Google Play link (until they pull it!)


After less than 24 hours the app got pulled from the store by Google, but still managed to get an impressive 5,646 downloads with 143 comments and a 4.7 / 5 user rating. I’ve removed all the Google branding and repackaged it – Here’s the Google Play link

Read More

Getting a YouTube clip to run inside your Android application

Recently I’ve been working on an application for a company based near to where I live – part of their application involves some video in the app. Now Android has a 50 meg limit on apk files in the market, so I was tasked with streaming the videos from YouTube, which doesn’t seem to be a massive problem up front.

How wrong I was.

Getting YouTube videos to stream inside an Android app is actually really difficult – I hunted for hours on looking for something which would work, only to be given half baked code or ill-thought-out solutions. I got something working by faking the browser agent and loading the video directly, but this would only work in Android 2.x and then only if the user has Flash installed.

So I wrote to my client – telling them that I’d already spent quite a lot of time on this, and that I wanted them to make a call on how best to proceed…and about 30 minutes later I found the answer. Open YouTube Player is a fantastic bit of code, written by Keyes Labs which you can pretty much drop in to your code to get working. It looks like it’s dependant on the way YouTube encodes their videos, so if that changes then it may break, but the project is active on and it’s the best solution I’ve found.

I hope this saves someone else a lot of hunting the internet for a solution to this problem, and a massive thanks to Keyes Labs.

Read More

My Android Sqlite3 helper batch file for DOS

Back in the day I used to use Windows as my main dev OS (now I like Kubuntu a lot more), and wrote this batch file to help me when I had to investigate a database on a device. I found it today when I was helping Seren out with one of her apps, and thought I would post it up as it may be useful to someone.

@echo off
echo. %1
echo. copy this string to open your db in sqlite3
echo. sqlite3 /data/data/<YOUR PACKAGE NAME HERE>/databases/<YOUR DB NAME>.db
echo. --
echo. within sqlite3 paste these three lines, they will:
echo. 1. turn column mode on so that your data is presented nicely
echo. 2. turn the headers on so you can tell which columns are which
echo. 3. tell you the tables within the database
echo. .mode column
echo. .headers on
echo. .tables
echo. --
echo. These next 4 lines are just reminders of how to do basic database manipulation in SQL
echo. select * from event where parent_id="4610";
echo. delete from event where event_id="5462";
echo. insert into event (id, something) values (4, sdfv);
echo. update event set id=43, something=[23]
if "%1" == "-e" goto :startemulator
if "%1" == "-d" goto :startdevice
if "%1" == "" goto :startdevice
goto :end

echo. starting emulator shell
adb -e shell
goto :end

echo. starting device shell
adb -d shell
goto :end


Read More

3rd Party Andriod Libraries

A few weeks ago I went to DroidCon 11 in London – there were some really great presentations although I felt that I picked up less than I did last year. I don’t know if this is because the lack of the US Google guys, or that I’ve another year of Android development under my belt so know a lot more about the platform or something else.

Something that I did take away from the conference, and I’ve noticed that languages/platforms do this as they hit the big time (in my previous life I was a front end web dev, and I noticed the same with JavaScript), was that the Android ecosystem is maturing and with it a lot of libraries are emerging.

Today I stumbled upon this StackOverflow link detailing a lot of libraries – What Android 3rd-party libraries are there?.

Handy – no?

Read More

Book review : Android Wireless Application Development

Original review posted on the Barnes & Noble site.

As a seasoned Android developer it’s easy to forget the steps necessary in getting up and going with the platform – Conder and Darcey do a very good job of explaining the basics, with a small taster of the more complex stuff, with plenty of code examples to help along the way and just enough levity to keep the experience engaging (I also want to call my pet Null!) For someone new to the platform this is definitely a book you can read the first third of without skipping any, and then refer back to as a reference guide as and when needed.

The middle parts of the book, where the more complex ideas come in, aren’t full enough to be of any real use – the OpenGL and NDK sections could have multiple books written about each. I’m stuck between wondering if they are a nice, but brief, introduction which people will find useful to whet the palate, or short enough, and not detailed enough, to be of no real use and to warrant not being included in the first place. The latter parts of the book include some useful guides for testing and selling you Android app, as well as some short but useful sections on Eclipse; the emulator; SQLite and ADB. I found there were a few items I would have liked to have seen some more info about (i.e. broadcast receivers receive very little attention), and there were a few small coding mistakes throughout the book. The order of the sections in the latter half of the book also looked like they could have had a little more thought applied to them.

Overall this is a solid book for getting up to speed with Android development and the negative points are small enough so as to not distract from the overall learning experience. It’s not a book you are going to keep forever as once you learn the basics you’ll want to move on to other fuller, and more detailed, sources.

Read More