My name is Simeon and I’ll be your friendly neighborhood developer advocate. I’m here to help you learn about building extensions targeting Firefox for Android. I’ll be answering your questions here, hosting office hours sessions where we can talk one-on-one, working on documentation, and generally aiming to help you build awesome stuff for users.
Good luck and happy coding!
Simeon Vincent
Developer Relations Engineer
Firefox Add-ons
I’ve seen you active in the Chrome extensions community for many years, are you sure you are not a spy stealing Firefox secrets here?
(to prove otherwise, you must give us all Chrome secrets!)
Regarding the Android extensions support that should come soon, I have a single wish and maybe you can help push it , the storage.sync support! (what feature/API do you miss the most on Android?)
Haha, thanks for the welcome, @juraj.masiar. Alas, I’m not much of one for secrets. I tend to focus more on helping extension developers and figuring out how to improve the WebExtension platform. I’ll see what I can find out about storage.sync. Thanks for linking directly to the issue.
As for what I miss most on Android, to be honest I’m still finding my feet with building extensions on Android. I think the thing I miss most is screen space. I think one of the biggest challenges extension developers have is signaling to the user that they can do something useful without getting in the user’s way. That’s tricky on desktop, but it’s even more difficult on mobile.
The popup “works”, but it’s opened as a “kind of tab” (full screen without URL bar).
But you get access to the currently opened tab with “activeTab” permission.
I agree on big tablets it would be nice to have actual popup window. Although it’s hard to say if it would fit since maximum popup size is 800x600px and that’s a lot of space even for tablets.
Hi! @dotproto
I am working on an feature and I want to make a apk for firefox-fenix with my extension installed,
I was able to run web-ext for nightly downloaded from the playstore.
I’m not sure I understand. Are you looking to distribute your extension as part of your Android app, are you trying to crate alternate browser based on Firefox that includes your extension, or something else?
I’m not aware of any current plans to let Firefox install an extension that’s provided by another Android application. Extension installs need to either need to come from AMO or a self distribution option. At the moment Android only supports distribution through AMO.
@Ayush_Chaudhary and I looked into this during an office hours session. It turned out that it was a bug in the extension’s content scripts match pattern. On desktop YouTube uses the domain https://www.youtube.com but on mobile they use https://m.youtube.com, so to cover both we used a match pattern of https://*.youtube.com/*.
Unfortunately, MV3 is out of scope on Android for now. We don’t currently have an estimate for when it might be supported, but I’m confident that it won’t land before the end of the year. We’ll share updates here and on the blog when we have more details.
It may still work well on Firefox for Android, but unfortunately it will require a little more work to be compatible. Is your extension only targeting Firefox or are you also aiming to be compatible with Chrome(ium)?
If you’re only targeting Firefox, you may be able to make a couple small tweaks to your manifest to get Android compatibility:
Move "host_permissions" entries into the "permissions" array.
From there, run web-ext lint or try loading it in Firefox to see if there are any other errors that need to be tweaked.
If you are targeting Chrome compatibility, you’ll likely want to set up a build step to create two different builds of your extensions. One version will use the current manifest.json and will be uploaded to Chrome’s store. The other version will use a new manifest.json as described above and be uploaded to AMO.
I’m not sure when this landed, but manifest v3 host permissions are working on Android in Firefox Beta (120) right now. The catch is that manually configuring (or viewing) permissions is not possible, the only way host permissions can be assigned is through a permission prompt, which works in 120 but not 119. So it doesn’t seem to be a showstopper anymore.