Extensions for Firefox for Android

This is an archived page. It's not actively maintained.

Firefox for Android supports add-ons using the same extension system used by all other Gecko-based applications. You can use the Add-on SDK or build manually bootstrapped restartless add-ons. You can even develop traditional restart-required add-ons, although the other two approaches are preferable.

Add-ons that work with desktop Firefox do not automatically work in Firefox for Android:

  • There is no visible XUL in the UI, so you can't use an overlay to create the UI.
  • Internal code and objects, like gBrowser, do not exist. Look at the Firefox on Android browser.js file to learn about the internals. Much of the same fundamental functionality exists.
  • Services like nsIPromptService and nsIAlertsService are implemented to use native Android UI.
  • There is a simple JavaScript object, called NativeWindow, that allows you to manipulate parts of the native Android UI.

The following articles provide help with developing extensions for Firefox on Android. In addition, please refer to the general extension documentation that applies to all Mozilla applications.


Developing, packaging and installing a simple add-on for Firefox for Android.
Firefox Hub Walkthrough
How to develop a Firefox Hub add-on to add content to the Firefox for Android home page.
Add-on SDK
How to develop Firefox for Android add-ons using the Add-on SDK.

Sample code

Code Snippets
Code samples for common tasks.
Initialization and Cleanup
How to initialize your add-on when it is started and clean up when it is shut down.
Firefox for Android Add-ons Github Repo
A collection of JS modules, sample code, and boilerplate repos to help you build add-ons for Firefox for Android.

API reference

Create native Android UI widgets.
Access browser tabs and the web content they host.
Show native Android dialogs.
Query and launch native apps installed on the system.
Use extended properties for Android system notifications.
Customize the home page.
Store data to display on the home page.