How to get started with writing extensions for Firefox on Android?

Hello,

I have no previous experience with writing extensions for Firefox on any platform and would like to hack something together for my Android version of Firefox. Where can I find information on how to start?

I had a quick look around and things look pretty confusing. I somehow arrived at this website which seems like the official guide (albeit with a a strange domain name) but it says nothing about the actual development of extensions, only set-up, tooling, debugging…

There is also a big fat warning about “reimagined” Firefox running on a different engine but no mention of what it means for writing extensions for it. Has it also been reimagined? Are the articles on that website for the new version, old version, desktop version or all versions?

On this very forum I came across this post:

Is this what I should follow for writing an extension for Firefox on Android? Will the steps described in this article work or are they for the desktop version?

I just don’t want to spend half a day following guides that are either out of date or irrelevant to what I want to do and it’s unclear what guide is applicable to what.

Thanks

Developing extensions for Android is essentially the same as for normal desktop Firefox, except that the supported APIs are different (see the support tables at the bottom of documentation pages) and that you need to load the extension and debug it slightly differently. I think you pretty much found all the resources there are. I think the missing link for you is that almost everything for the actual code structure etc. for desktop also applies for Android, since it’s like a website, the only thing that changes is the browser it’s running in.

The biggest difference, however, is that the availability of the extension for users is vastly different from desktop: https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/ (and its related posts; TLDR is that you can’t just upload an extension to addons.mozilla.org and people will be able to install it on Android)

1 Like