A quick update on Firefox OS

A couple of months ago I wrote about having bought a Geeksphone Keon, one of the early developer devices for FirefoxOS. I haven’t done much—all right, any—developing with it, but I have continued to use it and update it occasionally on the Firefox 1.2 developer track.

Some of the changes so far:

  • Navigation and browsing have got quite a bit faster, kinetic scrolling is improved, and the on-screen keyboard has become more reliable. There’s evidently been a lot of tuning going on. As a pure web-browsing experience, this device is now really nice.
  • I wrote, “Anyone know what audio recording and playback latencies are like?” — well, it turned out that audio capture was not supported at all in the device as shipped. Support is now appearing in the Gecko 26 release branch which Firefox OS 1.2 will be based on, and basic audio input works on my device now.
  • Strangely, the on-screen keyboard has changed from showing a mixture of caps and lower case (i.e. lower case on each key until you hit Shift, then switching to caps), as on Android devices, to showing only caps as on iOS. I wonder why?
  • The 1.2 track isn’t all that reliable at the moment. For example the email client doesn’t work on my device, though that doesn’t actually bother me because the Fastmail browser interface works very well on it. Screen rotation seems to be taking a holiday, and the notifications pulldown doesn’t always want to go away when I ask it to. Very interesting to keep an eye on though.

 

Firefox OS on the Geeksphone Keon

(Previous post: What is Firefox OS all about?)

Hardware

KeonTo get this out of the way first: this is clearly intended to be the lowest-end device that Firefox OS apps will need to support. It’s distinctly bargain-basement.

By far the best thing about this hardware is its soft-touch orange plastic rear cover, which is nice to look at and delightful to grip.

(Digression: it’s interesting how many expensive smartphones are unpleasant to hold. The iPhone 4 and 5 are sharp and angular, Samsung’s premium phones feel alien and tacky, and Nokia’s Windows Phone devices that I have encountered have been either very hard around the corners or grossly big. HTC is the one company that seems to have focused on how to make a phone feel natural in the hand. Not that it’s done them any good in the market.)

The loudspeaker isn’t bad, in a kitchen radio sort of way. The headphone jack is not so good. The battery is removable; the mini-SIM and micro-SD card slots are easily reached.

The worst thing about it, by “modern” standards, is the screen—but then, good screens are expensive. My first impression was pretty bad because the first thing I tried to do with it was use it outside on a sunny day. That doesn’t work so well.

Basics of the OS

Starting up and running a current Firefox OS build (as of June 2013) is pretty painless. It boots quickly into a sensible homescreen arrangement. An over-the-air update arrived just after the phone did, and installed without trouble. SIM and SD card are recognised, it makes calls and sends texts, and the wifi is more stable than my usual phone. (Much of this stuff is borrowed back from Android.)

The browser is as you’d expect from Firefox; there’s a Nokia maps app—though I didn’t manage to get it to recognise my location—; app installation from the marketplace is painless. Not that there’s much to install, and I’ve no idea how billing will work, as it seems to be free apps only at the moment.

It works well as a music player. My kids rapidly requisitioned it for that purpose, resulting in embarrassment at work the next day when I hit the wrong button and got Harlem Shake at top volume. Kids, what were you thinking? That song is over four months old!

Email is easy to set up and pleasant to use.The camera’s crap, but the camera app appears to be OK.

Angry Birds is not available.

UI design

KeonI’ve no idea how provisional the general design of Firefox OS is, but I like the basics. You get a homescreen with a clock, a few quick access buttons, and your wallpaper. Swipe one way to get a grid of installed apps, the other way to get the marketplace. Swipe down for the now-traditional translucent notifications pane. It’s simple and it works fine. I like it.

Navigation design within apps is less satisfying. The sheer inclusiveness of a browser-app-based phone means that many apps are not going to be well-adapted to a common platform design. The principle seems to be, mainly, to hope that there’s enough in common amongst mobile versions of websites to avoid too much user confusion.

There are a lot of half-width buttons at screen edges, which I assume are intended to take advantage of the fact that there’s more “effective” touchable space there. That works, kind of, but the Keon’s touchscreen isn’t responsive enough for me to trust it. (Similarly, using the on-screen keyboard is something I anticipate without much joy.)

Scrolling and transitions are currently just functional. There’s no bounce scrolling, and kinetic scrolling sometimes stops working or works only in one direction. Interactions like these are sometimes jerky. I have confidence in the Mozilla developers’ ability to sort out things like this.

Firefox OS is unusual in using a distinctly humanist font. Appropriately, it seems to be an evolution of the “anti-Helvetica,” FontFont Meta, from the same designer (Erik Spiekermann). The Firefox version (called Feura) is tuned for small-screen legibility, and it looks lovely.  I do worry that I might tire of it; the less mechanical and more distinctive a font, the more likely it is to wear you out eventually. Let’s see.

Would I buy it?

KeonEr, I did buy it.

But would I buy it as my only phone?

Not at the moment. There’s potential, though, and I think it may depend on how practical I was feeling. You might expect this to be a fun toy that isn’t particularly useful, but the opposite is true: it would be quite workable for down-to-earth business use, it just currently isn’t that much fun to use. Still, if my other phone died, I could certainly get by with this one.

Hardware-wise, I’d quite like a phone from this manufacturer, with this case, with fancier screen and innards. It’s not the most elegant object, but I do rather like it.

But this isn’t a consumer product, it’s a developer device.

Will the platform succeed?

Here I’m moderately optimistic.

I hope improvements are possible to the general slickness and smoothness of the device, because there’s definitely some work to be done there. But the functional basics are sound, and I think the fact that your business is already developing for this device (almost) could work out for it.

The OS seems designed to be minimally obstructive for everyday communications work, and it is complete enough to do that work. I appreciate it and I am keen to mess with it. Anyone know what audio recording and playback latencies are like?

What is Firefox OS all about?

When I first read about Firefox OS, the ongoing project to make an operating system for phones and tablets that runs entirely in a Firefox browser, I thought: what a marvellously futile idea.

The world isn’t short on niche, provisional, or failed experiments in operating systems for phones: Sailfish, Tizen, webOS, BB10, Ubuntu-for-phones, Meego, (cough) Windows Phone 8… Firefox OS is aimed at low-end phones—just the sort where you’d expect the hardware efficiency and limited data requirements of offline native-code apps to offer a big advantage over the browser. So I was ambivalent about its advantages to the user.

The developer side is interesting, though.

C++, the Portable Choice

Look at the current mainstream phone platforms.

For iOS, the “native” development language and framework is Objective-C with Cocoa. For Android, it is Java. For Windows Phone 7 (I do mean 7, rather than 8) it was C# with Silverlight or XNA frameworks.

These three are totally mutually incompatible. You can’t reuse Objective-C/Cocoa code on Android, you can’t run Java on iOS, and the Windows Phone managed environment was incompatible with both.

But every platform has an embeddable web browser, so besides native apps, there have always been somewhat cross-platform HTML apps—often developed using tools like PhoneGap. These aren’t always popular with users, something widely acknowledged when Facebook rewrote their HTML-based iOS app as a native one.

The tension is that while native apps usually work better than totally cross-platform ones, it is desirable to be able to reuse at least some of an app’s business logic across platforms. So developers have increasingly been shifting business logic from the platforms’ primary languages to C++. Google made increasingly more of the Android frameworks accessible from C++ using the Android NDK; Microsoft switched to C++ as their recommended language when developing for Windows Phone 8. Objective-C apps can incorporate C++, so the same code can serve across all three platforms. (How interesting that C++ should have become the portable choice in preference to Java or C#.)

This situation isn’t wholly satisfactory, not least because C++ is a difficult language to learn to write reliable, comprehensible code in.

The Web Angle

So there may be no successful portable managed runtime for typical apps, but there is a very widely used portable runtime on the web, in the form of Javascript. All the major browser makers have been hammering on Javascript optimisations for some years; it now runs pretty much as fast as managed environments outside the browser do, and it’s become widely accepted as a compilation target for other languages (this page lists over 200 of them). The Firefox developers have formalised this arrangement through asm.js, a subset of Javascript designed for fast execution and intended only to be used as a compilation target.

The final piece in that particular puzzle is Emscripten. This so, so wrong piece of software is a backend for a standard C++ compiler, which compiles C or C++ to Javascript. It includes Javascript libraries that map some widely used C infrastructure (such as OpenGL or sockets) to the browser equivalents (WebGL, WebSockets). The resulting code approaches half the speed of native code—except that work such as 3D rendering happens at full speed, because it’s handled by the same OpenGL stack in either case.

So: we have a code environment (the Javascript target) that is genuinely cross-platform, comparable with managed runtimes like the JVM or CLR for performance (though not as sophisticated in terms of memory management) and supported on every current desktop and mobile device. We have a tool that takes existing portable C++ business logic and compiles it to that target. And now, in the shape of Firefox OS, we have a phone OS on which that environment is the native one.

Now there are still all sorts of holes and potential pitfalls here. But you’ve got to admit, it’s a pretty interesting proposition.

So I bought one of the Firefox OS developer devices to have a look at. In my next post I’ll make a few notes about the current state of the platform, and try to guess whether any non-developer would ever want to use it.