Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created April 27, 2012 20:41
Show Gist options
  • Save wbamberg/2512904 to your computer and use it in GitHub Desktop.
Save wbamberg/2512904 to your computer and use it in GitHub Desktop.

Firefox for Android

For more and more people mobile devices are the primary way, or even the only way, to access the Web. But at the moment the mobile web suffers from closed and controlled software platforms and a tendency towards a browser monoculture.

Firefox for Android (codenamed Fennec) is an open, hackable, standards-based alternative browser, just like the desktop Firefox.

There are two different flavors of Firefox for Android, one for tablets and one for phones:

  • the original version of Firefox for Android, like the desktop Firefox, uses XUL to construct its user interface. This is still the version aimed at, and officially supported on, tablets.

  • the new version of Firefox for Android uses native Android widgets instead of XUL: this greatly improves performance, especially startup time, and memory consumption. This version is targeted at phones, although it also runs on tablets.

The Firefox for Android Project

The main starting point for information about the Firefox for Android project itself is the project Wiki page.

You can help us to build Firefox for Android: provide feedback via IRC, join our Wednesday development meeting, or even file some bugs.

Keep up to date with project news on planet firefox and Twitter.

Firefox for Android for Web Developers

To test your web site on Firefox for Android, you can install it on an Android device or run it on your desktop using the Android Emulator.

To learn about the UA string used by Firefox for Android, and about APIs like geolocation that are particularly useful for mobile developers, see the Firefox Mobile for Developers page. this page really needs to be updated, and it might be good to list a few important APIs here

Firefox for Android for Add-on Developers

Just as on the desktop, you can extend and modify Firefox for Android by creating add-ons.

Traditional add-ons

To create traditional add-ons, see the Fennec Extensions guide.

Firefox for Android renders web content and the main application code in separate processes (separate threads in the native version) which has big effects on add-ons that need to interact with web content: see the page on Electrolysis for more details.

Also, since the native version of Firefox for Android does not use XUL, you can't use XUL overlays to build a user interface. Instead, use the Native Window object to create native Android user interface components.

Add-on SDK

Alternatively, you can use the Add-on SDK to create add-ons which work on both the mobile and the desktop versions of Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment