1

I've created an extension with the following manifest to add a search engine to Firefox.

{
  "manifest_version": 2,
  "name": "Google Browse by Name search engine",
  "description": "Adds a search engine that searches Google using its Browse by Name feature",
  "version": "1.0",
  "applications": {
    "gecko": {
      "strict_min_version": "55.0"
    }
  },
  "chrome_settings_overrides": {
    "search_provider": {
      "name": "Browse by Name",
      "search_url": "https://www.google.com/search?sourceid=navclient&gfns=1&q={searchTerms}",
      "keyword": "bbn",
      "favicon_url": "https://www.google.com/favicon.ico",
      "is_default": false
    }
  }
} 

This works as expected on Firefox desktop, adding an option to the list of enabled search engines. However, it does not appear to work on Firefox Android, I assume because chrome_settings_overrides is not supported on Android.

Addons making use of the legacy API appear to work correctly (e.g. Startpage), adding search engines to the Android browser, but since Firefox is dropping support for legacy (non webextension) extensions this is no longer a solution.

What is the correct way to add a search engine to Firefox for Android using an addon?

I am aware that users can add a search engine available on a webpage by long-pressing on its search field, but I would like to offer an extension to automatically install the search engine (and save users from having to find a page offering the correct search field).

enigma
  • 3,476
  • 2
  • 17
  • 30
  • You wait until `chrome_settings_overrides` is implemented for Android. Find/file a bug asking for the implementation. Implement a [WebExtension Experiment](https://webextensions-experiments.readthedocs.io/en/latest/index.html) which adds this feature. – Makyen Oct 19 '17 at 01:39
  • @Makyen Thanks, I'd not heard of webextension experiments, and also thought there might be an alternative API which I was missing. I'll look into doing what you've suggested. – enigma Oct 19 '17 at 01:56
  • I wish there was an alternative. Unfortunately, Smolderfox (FF57+), only has WebExtensions. – Makyen Oct 19 '17 at 02:09

0 Answers0